Theme import & export #1563

Closed
elomatreb wants to merge 0 commits from gitlab-mr-iid-290 into develop
Member

I took a basic shot at implementing #119.

WIP because I'm not sure about the styles for the buttons, they look rather weird (screenshot), but I wasn't sure how I should change the styles to conform to the rest of the site. Any feedback would be nice.

TODO:

  • Button styles
  • Feedback when an invalid file is selected (either not JSON or not a valid theme object)
I took a basic shot at implementing #119. WIP because I'm not sure about the styles for the buttons, they look rather weird ([screenshot](https://screenshots.bertr.am/fuymbzrinsc.png)), but I wasn't sure how I should change the styles to conform to the rest of the site. Any feedback would be nice. TODO: * [x] Button styles * [x] Feedback when an invalid file is selected (either not JSON or not a valid theme object)
Author
Member

I went ahead and unified the button styles into the global styles, it seemed to be duplicated across a lot of components needlessly. While doing that I also changed the static width that was set on them to a min-width, this keeps the look of them where the text is short enough just like they were before the change, but it allows them to get wider if the text is longer. This is probably helpful for localization, e.g. German tends to be long.

I also added a version key to the exported theme files, this should prevent headaches if there is a more advanced version of this in the future.

I went ahead and unified the button styles into the global styles, it seemed to be duplicated across a lot of components needlessly. While doing that I also changed the static `width` that was set on them to a `min-width`, this keeps the look of them where the text is short enough just like they were before the change, but it allows them to get wider if the text is longer. This is probably helpful for localization, e.g. German tends to be long. I also added a version key to the exported theme files, this should prevent headaches if there is a more advanced version of this in the future.
Owner

@elomatreb @kaniini @lambadalambda the whole "replace width with min-width" doesn't really do any good, tbh.

image
image

@elomatreb @kaniini @lambadalambda the whole "replace width with min-width" doesn't really do any good, tbh. ![image](/attachments/162621c5-2de9-409c-a51e-2b8368d6345c) ![image](/attachments/59dcd8ca-084d-4e7d-a41d-89912f13f94a)
9.9 KiB
222 KiB

Pull request closed

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