Glimesh / glimesh.tv

Glimesh is a next generation live streaming platform built by the community, for the community.
https://glimesh.tv
Other
465 stars 77 forks source link

Preview profile markdown #840

Closed aMytho closed 2 years ago

aMytho commented 2 years ago

This PR adds a markdown preview to the profile page.

The bootstrap tabs have been replaced by conditional rendering. The raw markdown data is passed to the server per keypress but is only converted when the user presses the preview button. The other form inputs have a phx-ignore attribute to prevent their value from being overwritten when the page changes.

clone1018 commented 2 years ago

Looks good! Works great locally too.

One question: any chance of switching this back to a tab like design? The buttons don't exactly suggest what is happening:

image

aMytho commented 2 years ago

I used the phoenix JS modules to remove/add the button backgrounds based on what is selected. It looks the same as the normal tabs now. The only difference is that preview uses btn-info instead of btn-primary.