#459 - add feature to preview status before submitting #1999

Closed
jaredr wants to merge 8 commits from gitlab-mr-iid-729 into develop
Member

Closes #459

Closes #459
Author
Member

Here are the screenshots

Updated layout

image

Preview mode

image

Submitted

image

**Here are the screenshots** Updated layout ![image](/attachments/4b34bc55-6c69-433a-881b-49826983c171) Preview mode ![image](/attachments/f66b6538-3dd3-47d2-acca-4a1c3dbdf341) Submitted ![image](/attachments/fee230cb-b8a8-4c75-84c8-5756f5129d49)
Member

custom emojis do not seem to enforce size limits 2019-04-04-1921352019-04-04-192140

custom emojis do not seem to enforce size limits ![2019-04-04-192135](/attachments/93316e3a-c014-45f5-b43a-f0010cd578c3)![2019-04-04-192140](/attachments/aa893bd1-a4f3-4565-8e69-4573f607c126)
Member

I'm thinking live preview next to input field might be better since we're probably be doing "This DM will be sent to..." which should be live-updated anyway.

I'm thinking live preview next to input field might be better since we're probably be doing "This DM will be sent to..." which should be live-updated anyway.
Member

the input field height gets reset after preview has been triggered

2019-04-04-2130282019-04-04-2130362019-04-04-213041

the input field height gets reset after preview has been triggered ![2019-04-04-213028](/attachments/4acdd8fc-cf27-4036-9ec0-7cc768e59bf0)![2019-04-04-213036](/attachments/f09e87b9-6984-4c92-bb2c-b07f1249b129)![2019-04-04-213041](/attachments/ab680831-b698-4f46-9b4b-b0829371363f)
Author
Member

@rinpatch Nice catch. I will check again.

@rinpatch Nice catch. I will check again.
Member

can we do it side-by-side tho?
image

can we do it side-by-side tho? ![image](/attachments/836b3574-4f17-44a3-ae0f-a9a4a28a5728)
264 KiB
Author
Member

@hj There's no space in the sidebar to make it side by side.

@hj There's no space in the sidebar to make it side by side.
Member

I don't think side-by-side is necessary and it would mean making 2 versions when taking mobile in account too. I would change the "Done" button to "Edit".

I don't think side-by-side is necessary and it would mean making 2 versions when taking mobile in account too. I would change the "Done" button to "Edit".
Member

could be over/under reddit-style as well

could be over/under reddit-style as well
Member

the idea is that switching preview and text back-and-forth isn't very convenient and that we need live preview for DM mentions anyways

the idea is that switching preview and text back-and-forth isn't very convenient and that we need live preview for DM mentions anyways
Member

@jaredr you can make it popup

@jaredr you can make it popup
Author
Member

@rinpatch input field height after preview issue is fixed now.

@rinpatch input field height after preview issue is fixed now.
Author
Member

@shpuld I updated the button text to Edit as you suggested.

@shpuld I updated the button text to `Edit` as you suggested.
Author
Member

@hj I couldn't find the preview feature before submitting on Reddit.

And as for the real-time preview, it's not realistic since sometimes it takes a few seconds to post status and get preview data.

And currently sidebar has overflow: hidden;, and we need to refactor this to show the popup out of the sidebar area.

Also as @shpuld mentioned we need to consider mobile size as well. On mobile, where should be place the preview popup?

@hj I couldn't find the preview feature before submitting on Reddit. And as for the real-time preview, it's not realistic since sometimes it takes a few seconds to post status and get preview data. And currently sidebar has `overflow: hidden;`, and we need to refactor this to show the popup out of the sidebar area. Also as @shpuld mentioned we need to consider mobile size as well. On mobile, where should be place the preview popup?
Member

It's realistic, it's throttled sure but it's better.

Also we do have popper.js don't we?

It's realistic, it's throttled sure but it's better. Also we do have popper.js don't we?
Member

Ok, sorry it was Reddit Enhancement Suite feature, not vanilla reddit.

image

Ok, sorry it was Reddit Enhancement Suite feature, not vanilla reddit. ![image](/attachments/96c47bfa-269c-4cac-97b6-da622258a8d9)
Member

I think floating it on the side would be really ugly and would be desktop specific only, and would cover part of the timeline when showing preview. if we really need live preview I'd place it above or below instead without needing any overlap anywhere, but I'm not convinced why we'd need live previews for dm mentions? preview should always need toggling on to not always waste space (I know I don't want it in 99% of my usage), and if it's necessary for dms you would have to have it in/as a confirmation dialog or something.

I think floating it on the side would be really ugly and would be desktop specific only, and would cover part of the timeline when showing preview. if we really need live preview I'd place it above or below instead without needing any overlap anywhere, but I'm not convinced why we'd need live previews for dm mentions? preview should always need toggling on to not always waste space (I know I don't want it in 99% of my usage), and if it's necessary for dms you would have to have it in/as a confirmation dialog or something.
Author
Member

Sorry, by mistake, I clicked the close button.

Sorry, by mistake, I clicked the `close` button.
Author
Member

And we really need to follow the mobile first approach these days. Live preview on popper will be annoying on mobile devices.

In case we really need a live preview, I think the best place is below the submit button from my point of view.

And we really need to follow the mobile first approach these days. Live preview on popper will be annoying on mobile devices. In case we really need a live preview, I think the best place is below the submit button from my point of view.
Owner

My only question is the buttons on preview: Done and Submit. That's confusing. Shouldn't it be something like Back and Submit ?

Done has no clear meaning here.

edit: or maybe Edit and Submit?

My only question is the buttons on preview: `Done` and `Submit`. That's confusing. Shouldn't it be something like `Back` and `Submit` ? `Done` has no clear meaning here. edit: or maybe `Edit` and `Submit`?
Author
Member

It's already Edit & Submit now. It's updated already.

It's already `Edit` & `Submit` now. It's updated already.
Author
Member

Created another MR[#2002] with clean up and rebase since safe_dm part was added by accident in this MR.

Closing this MR...

Created another MR[https://git.pleroma.social/pleroma/pleroma-fe/pulls/2002] with clean up and rebase since `safe_dm` part was added by accident in this MR. Closing this MR...

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pleroma/pleroma-fe!1999
No description provided.