Status preview #459 #2426

Closed
shpuld wants to merge 0 commits from gitlab-mr-iid-1159 into develop
Member

MR #2002 was too outdated, started over.

UPDATED LOOK:

imageimage

VIDEO:
video

OLD STUFF:

Adds "Preview" option above post status form when a rich text format is selected.

imageimage

When server is taking its time to process:

image

A preview with HTML and MD (updates automatically on switch):

imageimage

When the server denies your crap

image

Attachments also work

image

MR #2002 was too outdated, started over. UPDATED LOOK: ![image](/attachments/9902fab4-5d93-4f57-89a8-96d621b3c0de)![image](/attachments/8f91c25a-2e91-481d-a554-1858c52f1444) VIDEO: ![video](https://shpposter.club/media/0db835f4d6e195b58334bc1cb1b5ef65ff824b62fb148a4723da6736ff2723e1.mp4) OLD STUFF: Adds "Preview" option above post status form ~~when a rich text format is selected.~~ ![image](/attachments/f2e9de1e-114b-4014-945d-bff7bf2eac68)![image](/attachments/22c29499-56e3-4f38-922b-9559fdfcf178) When server is taking its time to process: ![image](/attachments/4077256f-85b8-497a-9f15-4b608ac2fb5d) A preview with HTML and MD (updates automatically on switch): ![image](/attachments/5cbb99a5-9c8d-457e-9752-582f4b84e2e4)![image](/attachments/98c4ee2f-fb2e-4adf-bec7-878801264155) When the server denies your crap ![image](/attachments/30013cca-fa48-40d4-99f0-a278b9a4af6f) Attachments also work ![image](/attachments/6da5f21c-3d6b-4e98-b9da-8aa7c038bbab)
Author
Member

This fixes the "Error: [Object Response]" problem we have when status posting goes wrong.

This fixes the "Error: [Object Response]" problem we have when status posting goes wrong.
Author
Member

I saw comment in the issue that this would be useful in plain text, I can change it if we still want it

I saw comment in the issue that this would be useful in plain text, I can change it if we still want it

Very nice! I think some form of auto-updating / live preview would be fine if the refresh is throttled or debounced.

Very nice! I think some form of auto-updating / live preview would be fine if the refresh is throttled or debounced.

it would be useful in plain text for emoji stuff, i think.

it would be useful in plain text for emoji stuff, i think.
Author
Member

could be done too

could be done too

although in that case we'll need to change the backend a bit to make it not trigger the rate limiting

although in that case we'll need to change the backend a bit to make it not trigger the rate limiting
issue at https://git.pleroma.social/pleroma/pleroma/-/issues/1899
Author
Member

I'm wondering how the UX will be when the content grows above the input fields pushing the layout down

I'm wondering how the UX will be when the content grows above the input fields pushing the layout down

maybe better put it below, then?

maybe better put it below, then?
Author
Member

it'd be very awkward under the attachments

it'd be very awkward under the attachments
Member

it is awkward that textbox is being pushed downwards, also previews the long post detector, not sure if it's good or not

image

it is awkward that textbox is being pushed downwards, also previews the long post detector, not sure if it's good or not ![image](/attachments/73ef0299-710b-4874-831e-9c6db933825a)
206 KiB
Member

however it should scroll textbox into view as you type

however it should scroll textbox into view as you type
Author
Member

oh yeah I didn't test on mobile. might be quite fucky.

having it treat long posts as long posts is fine imo, same with treating subjects the same way as they'd appear on your timeline

oh yeah I didn't test on mobile. might be quite fucky. having it treat long posts as long posts is fine imo, same with treating subjects the same way as they'd appear on your timeline
Member

image

"Preview" on the right side makes some weird spacing on the left side in modal post form and reply post form. Looks a bit out of place with link coloring but that's just habit i guess.

I'd change "Preview" to "Preview post" just for clarity and move it to the left side.

![image](/attachments/1897ce3b-cf02-487b-907b-0bd36a4b9506) "Preview" on the right side makes some weird spacing on the left side in modal post form and reply post form. Looks a bit out of place with link coloring but that's just habit i guess. I'd change "Preview" to "Preview post" just for clarity and move it to the left side.
Member

more stylistic problems:

  • spacing between preview and post form != spacing between "preview" link
  • One-line post has different height between "Loading..." and actual post content
  • close icon's hitbox is a bit too small vertically
more stylistic problems: * spacing between preview and post form != spacing between "preview" link * One-line post has different height between "Loading..." and actual post content * close icon's hitbox is a bit too small vertically
Author
Member

first one is intentional, you want a gap between the actual preview and the editables, it's a bit cluttered with the 1em gap already too. You don't really want that gap with just the button to open it.

the other two I can tweak but 1 liner size change isn't particularly important if you ask me

first one is intentional, you want a gap between the actual preview and the editables, it's a bit cluttered with the 1em gap already too. You don't really want that gap with just the button to open it. the other two I can tweak but 1 liner size change isn't particularly important if you ask me
Member

it's annoying and makes interface more jumpy than it should be

it's annoying and makes interface more jumpy than it should be
Author
Member

it's gonna jump a lot anyway, the alternatives are worse, if you refer to first one

it's gonna jump a lot anyway, the alternatives are worse, if you refer to first one
Author
Member

added automatic updates, it actually feels surprisingly fine. I'll experiment with positioning

added automatic updates, it actually feels surprisingly fine. I'll experiment with positioning
Author
Member

I tried adding polls to the preview, it doesn't work well and while it would be cool to see if your options look the way you wanted I think it's still more weird than useful. maybe I should take out the media files as well from the preview? I mean you see the media below the form already.

I tried adding polls to the preview, it doesn't work well and while it would be cool to see if your options look the way you wanted I think it's still more weird than useful. maybe I should take out the media files as well from the preview? I mean you see the media below the form already.
Member

yeah i didn't quite understand why attachments are there too, i vote to remove them.

I mean the only reason why you would want that is to check how it will arrange everything inside, which may not be correct because of different column width

yeah i didn't quite understand why attachments are there too, i vote to remove them. I mean the only reason why you would want that is to check how it will arrange everything inside, which may not be correct because of different column width
Author
Member

fixed the loading and error message line heights to match status, removed the X button in favor of unified show/hide toggle

fixed the loading and error message line heights to match status, removed the X button in favor of unified show/hide toggle
Author
Member

changed the heading to be a toggle instead of X show button and X button:

imageimage

changed the heading to be a toggle instead of X show button and X button: ![image](/attachments/5fca4c00-604d-4cc5-9d50-0093702f1189)![image](/attachments/87b01cb4-d50b-4669-9703-74a548964fd1)
Author
Member
Live previews in action https://shpposter.club/media/0db835f4d6e195b58334bc1cb1b5ef65ff824b62fb148a4723da6736ff2723e1.mp4
Member

Changing the subject line doesn't trigger the update

Changing the subject line doesn't trigger the update
Member

otherwise lgtm

otherwise lgtm
Member

also wanted to note that i would prefer preview not closing on posting in main post form, or at least have an option for that. not necessary for this MR tho

also wanted to note that i would prefer preview not closing on posting in main post form, or at least have an option for that. not necessary for this MR tho
Author
Member

I was just thinking the same, I'll change it, no need for an option imo

I was just thinking the same, I'll change it, no need for an option imo
Author
Member

lol something else to fix before merging

image

lol something else to fix before merging ![image](/attachments/90fb0c1b-a8e3-4e25-bc84-9a41e5dd56c5)

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2426
No description provided.