0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 20:33:51 +00:00
Commit Graph

5757 Commits

Author SHA1 Message Date
Trevor Buckner
e222811d03 Rename engine to renderer to unify naming
This value is named `renderer` everywhere else. Relabeling to a consistent name.
2024-07-13 18:06:46 -04:00
Trevor Buckner
c9b885f868 include theme as baseTheme when getting user brew themes
`baseTheme` for a user brew theme is just the `theme` value of that brew.
2024-07-13 18:01:50 -04:00
Trevor Buckner
fed65f5430 Merge branch 'master' into dependabot/npm_and_yarn/dompurify-3.1.6 2024-07-13 17:44:37 -04:00
Trevor Buckner
47f912750b Extract getting userThemes from getBrew()
`getBrew()` should do one thing only; retrieve a brew. UI elements like the list of themes available to the user are not part of a brew.

Moved into the handers for the `/edit/` and `/new/` endpoints
2024-07-13 17:44:23 -04:00
Trevor Buckner
f29a5e346e Remove id parameter from getUsersBrewThemes
Filtering out the current brew can be done later as needed; certain situations may call for retrieving the whole list.
2024-07-13 17:35:19 -04:00
Trevor Buckner
ee381c91fe Simplify getUserBrewThemes function a bit 2024-07-13 17:26:38 -04:00
Trevor Buckner
5f8d46f1b6 Reuse splitTextStyleAndMetadata from helpers.js 2024-07-13 17:09:45 -04:00
David Bolack
ade819c70c A not so light rework.
This removes the existing endpoints and replaces them with /theme.

/theme/:id - return a theme bundle containing all styling from this USER theme and any parents.
/theme/:engine/:id - return a theme bundle containing all styling from this STATIC theme and any parents

The theme bundle returns a marshalled JSON object containing:
  styles - an array of strings representing the collected styles in loading order
  snippets - an array ( currently empty ) of collected snippets.

The various bits of theme rendering code for <style> an style <link> have been swapped out with an 'onDidMount' call that loads the thendpoint and appends a series of <style> blocks to the brewRender's head.

This loses some caching advantages, but probably won't matter in the long run.
2024-07-13 12:12:05 -05:00
Trevor Buckner
c209a86f90 Merge branch 'master' into fixInkFriendlySnippet-#3563 2024-07-11 09:47:54 -04:00
Trevor Buckner
4fe38e3929 Merge pull request #3567 from G-Ambatte/fixUglyDropCap-#3551
Add additional styles to SolberaImitationRemake font declaration
2024-07-11 09:47:26 -04:00
Trevor Buckner
b6d69173cd Merge branch 'master' into fixUglyDropCap-#3551 2024-07-11 09:46:45 -04:00
Trevor Buckner
8b085e1806 Merge pull request #3569 from G-Ambatte/fixBrewItemLinkUnderlining-#3568
Unset text-decoration on Brew Item links
2024-07-11 09:46:36 -04:00
G.Ambatte
cb9d24d5b4 Remove text-decoration from Brew Item links 2024-07-11 20:03:17 +12:00
G.Ambatte
23fd70e3c3 Add additional style to existing SolberaImitation 2024-07-11 18:10:26 +12:00
Trevor Buckner
2fa3c0f311 themeClass is never used 2024-07-11 00:26:50 -04:00
Trevor Buckner
5c0a072115 userThemes passed to SnippetBar.jsx is never used 2024-07-11 00:25:11 -04:00
Trevor Buckner
29c2274a19 Unify some variable naming 2024-07-10 18:54:45 -04:00
Trevor Buckner
a6f787ea8f Remove getBrewThemeParentCSS 2024-07-10 17:56:39 -04:00
Trevor Buckner
24c86dd199 Remove unused test 2024-07-10 17:49:57 -04:00
Trevor Buckner
7eb96ee6be Simplify brewRenderer output to only emit current theme
Instead of Blank, Parent, and Theme, just make use of the @include chaining, to handle all parent themes down to and including Blank
2024-07-10 17:46:51 -04:00
Trevor Buckner
27aebf0e3b Give 5ePHB and Journal themes a baseTheme of "Blank" 2024-07-10 17:15:45 -04:00
Trevor Buckner
88578a3d16 Fix failing test 2024-07-10 14:22:42 -04:00
Trevor Buckner
28446d3ae2 Comments for theme CSS endpoints 2024-07-10 14:21:23 -04:00
Trevor Buckner
a247e50c9f renaming "get" functions
rename `getStaticTheme` to `getStaticThemeCSS`
rename `getBrewThemeWithCSS` to `getBrewThemeCSS`
rename `getBrewThemeParent` to `getBrewThemeParentCSS`

to avoid confusion with other "get" endpoints like `getBrew`, and unify naming for endpoint functions that return CSS.

Simplify `isStaticTheme` function (getting the parent theme is handled elsewhere)
2024-07-10 14:15:03 -04:00
David Bolack
656edb07ea Rework detection of user brews to look up themeid in static themes list before assuming is a user brew.
Ended up being a fairly straightforward change. A few ternaries got smooshed or inverted. Passes builtin and local tests. Need to compare on the test instance.
2024-07-08 18:12:58 -05:00
G.Ambatte
0cf79ceeb1 Merge branch 'master' into fixInkFriendlySnippet-#3563 2024-07-09 08:00:27 +12:00
G.Ambatte
7b9bd70554 Change filter to box-shadow 2024-07-08 19:57:21 +00:00
David Bolack
4b05bcac69 Merge branch 'master' into Issue_241 2024-07-08 10:16:57 -05:00
David Bolack
a413dc8d4f Merge branch 'master' into Issue_2563 2024-07-08 10:14:06 -05:00
David Bolack
74ee09397e Merge branch 'master' into Issue_2688 2024-07-08 10:08:54 -05:00
dependabot[bot]
a06aa2a103 Bump dompurify from 3.1.5 to 3.1.6
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 03:17:11 +00:00
David Bolack
ea6595d4d6 Merge branch 'master' into brew_themes_user_selection
Fixes a regression for legacy brews.
2024-07-07 12:03:15 -05:00
Trevor Buckner
5b02132e57 Merge pull request #3561 from naturalcrit/v3.13.1
Up Version to 3.13.1
2024-07-06 18:20:34 -04:00
Trevor Buckner
f8841c068f Up Version to 3.13.1 v3.13.1 2024-07-06 18:20:11 -04:00
Trevor Buckner
da1d08f8a9 Merge pull request #3560 from G-Ambatte/fixAttributeLeaking-#3559
Limit htmlString to the first element ONLY
2024-07-06 18:01:26 -04:00
Trevor Buckner
0a199e750f Simplify string splitting code
String.split will return the substring before > or the whole string if no > exists.
2024-07-06 18:00:18 -04:00
Trevor Buckner
5433cda52f Add test case 2024-07-06 17:05:23 -04:00
G.Ambatte
9c4de58161 Limit htmlString to the first element ONLY 2024-07-06 13:22:47 +12:00
Trevor Buckner
1b96dae27f Merge pull request #3543 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.11.0
Bump @googleapis/drive from 8.10.0 to 8.11.0
2024-07-05 18:09:10 -04:00
David Bolack
16ca52756d Merge branch 'master' into brew_themes_user_selection 2024-07-05 16:55:14 -05:00
David Bolack
645da7ae5f Merge branch 'brew_themes_user_selection' of github.com:dbolack-ab/homebrewery into brew_themes_user_selection 2024-07-05 16:54:11 -05:00
David Bolack
8570335d79 Consolidate variable redundancy. 2024-07-05 16:53:21 -05:00
dependabot[bot]
1564bc7448 Bump @googleapis/drive from 8.10.0 to 8.11.0
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 8.10.0 to 8.11.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/drive-v8.10.0...drive-v8.11.0)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 18:59:10 +00:00
Trevor Buckner
8e20d3ba10 Merge pull request #3539 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.34.3
Bump eslint-plugin-react from 7.34.2 to 7.34.3
2024-07-05 14:57:59 -04:00
dependabot[bot]
450baee66a Bump eslint-plugin-react from 7.34.2 to 7.34.3
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.34.2 to 7.34.3.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.2...v7.34.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 18:55:32 +00:00
Trevor Buckner
4b588786c4 Merge pull request #3538 from naturalcrit/dependabot/npm_and_yarn/ws-7.5.10
Bump ws from 7.5.9 to 7.5.10
2024-07-05 14:54:32 -04:00
dependabot[bot]
e07a04ebfa Bump ws from 7.5.9 to 7.5.10
Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 18:53:33 +00:00
Trevor Buckner
f707752c26 Merge pull request #3558 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.4.5
Bump mongoose from 8.4.1 to 8.4.5
2024-07-05 14:52:35 -04:00
dependabot[bot]
80e039b194 Bump mongoose from 8.4.1 to 8.4.5
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.4.1 to 8.4.5.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.4.1...8.4.5)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 18:41:01 +00:00
Trevor Buckner
c888df28aa Merge pull request #3533 from naturalcrit/dependabot/npm_and_yarn/marked-emoji-1.4.1
Bump marked-emoji from 1.4.0 to 1.4.1
2024-07-05 14:39:58 -04:00