Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable User Brew theme selection #3321

Open
wants to merge 79 commits into
base: master
Choose a base branch
from

Conversation

dbolack-ab
Copy link
Collaborator

@dbolack-ab dbolack-ab commented Feb 23, 2024

This adds the UI elements to the metadata selector for users to select brews tagged as theme or Theme as a brew's theme.

It also swaps in use of the CSS endpoints ( with small changes ) from #3303

This has been implemented three different ways to allow for comparison
and discussion

- /api/css/:id : This returns the style frontmatter of the referenced
  document as a text/css document.
/api/theme/:id : This returns an object with the reference'd object's
theme and style frontmatter.
/api/csstheme/:id : This returns the stylye frontmatter of the
referenced document as a text/css document and adds the theme as an
@import ( if not using the legacy renderer )
This adds a comment/field ( depending on endpoint ) that reports the
name of the Brew being used as a theming source.
This consolidates the style/theme endpoint to a singular method, adds
interpretation of static themes, and allow parent theme recursion.

I am not 100% sure this will order styles correctly.
This updates the theme picker to include brews tagged as themes owned by
the user.

Some supporting functions were updated. User themes are loaded on /edit
and added to the request.
@import statements are just not working. Uploaded for other eyes.
@dbolack-ab dbolack-ab marked this pull request as draft February 23, 2024 05:10
@dbolack-ab dbolack-ab marked this pull request as ready for review February 23, 2024 20:46
@dbolack-ab dbolack-ab marked this pull request as draft February 23, 2024 23:48
@dbolack-ab
Copy link
Collaborator Author

@5e-Cleric
Copy link
Member

A theme from a brew with renderer:legacy can be selected but the css does not arrive.

If you could in this PR, make sure legacy renderer brews are ignored completely, that would be nice.

@5e-Cleric
Copy link
Member

  • Brew themes in new brew (this is not necessarily bad, in my opninion its okay if its not in this PR, we can add it later)

Not sure I follow this?

/new has theme dropdown, but custom themes are not displayed:

Can't provide example right now as the whole system seems to be failing.

This adds the User Brew themes, where applicible, to the /new path.

This adds a semi-graceful failure to the metadata panel when a Brew Theme is declared as used but is not present.

More gracefully handles loading with themes not present.
For User/Brew Themes, display the first author instead of Brew/V3 in the first column.
Add 5e-Cleric's suggestsions to acvoid the title overflowing over the preview.
@5e-Cleric 5e-Cleric linked an issue May 14, 2024 that may be closed by this pull request
@5e-Cleric 5e-Cleric mentioned this pull request May 18, 2024
@5e-Cleric
Copy link
Member

What do we need to bring this one to the end?

@calculuschild
Copy link
Member

calculuschild commented May 28, 2024

I still want to give this one a deep review for code quality but if the functionality is working it should be mostly ready. This will be next on the stack when I get #3261 merged which should be soon.

Copy link
Member

@5e-Cleric 5e-Cleric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall nice changes, will further test, but this looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Has been discussed and an approach is agreed upon 🔍 R2 - Reviewed - Needs Help 🫱 PR is okayed but is stuck on an obstacle sub-epic Sub-task of an Epic UI/UX User Interface, user experience
Projects
Status: Next Priority
Development

Successfully merging this pull request may close these issues.

Custom Brew Themes
5 participants