0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-29 06:52:41 +00:00
Commit Graph

7240 Commits

Author SHA1 Message Date
David Bolack
d2afa7adea Move fetchThemeBundle into /shared/helpers
This might not be the best rework - I was unsure if the *this* that would be available when called would see the appropriate object so I assumed not and pass it as a parameter.
Works, but may be bad form.
2024-07-23 22:17:52 -05:00
Víctor Losada Hernández
e562ebef48 media query for mobile use expanded to vertical stack 2024-07-24 00:50:21 +02:00
Víctor Losada Hernández
e206b501a6 media query to show only one column in case of small window 2024-07-24 00:34:13 +02:00
Víctor Losada Hernández
016a9fa1e8 few css changes to make the page more responsive on smaller screens 2024-07-24 00:26:23 +02:00
Víctor Losada Hernández
01ee184044 "Update default count value from 10 to 20 in VaultPage component and vault API" 2024-07-23 23:57:05 +02:00
Trevor Buckner
8e7baca47d Fix tests 2024-07-23 17:40:32 -04:00
Trevor Buckner
ddc5693778 revert package-lock 2024-07-23 17:31:07 -04:00
Trevor Buckner
82f73fb21d cleanup 2024-07-23 17:24:50 -04:00
Trevor Buckner
27c52fc244 Fix loading CSS for Legacy 2024-07-23 17:11:48 -04:00
Trevor Buckner
ac82e3ecb2 Add to home page 2024-07-23 16:50:29 -04:00
Trevor Buckner
22b6aa14f0 Add to /new page 2024-07-23 16:43:23 -04:00
Trevor Buckner
24ab3d3392 Merge branch 'brew_themes_user_selection' of https://github.com/dbolack-ab/homebrewery into pr/3321 2024-07-23 16:26:35 -04:00
Trevor Buckner
0b01f27d11 Load theme bundles on /share page 2024-07-23 16:26:33 -04:00
David Bolack
d640ad6bb7 Update Node version for Docker 2024-07-22 19:13:38 -05:00
Víctor Losada Hernández
fd91bf0fff Merge branch 'master' into Issue_1430_Unique_HeaderIDs 2024-07-22 23:07:06 +02:00
Víctor Losada Hernández
270aa9e0f9 Merge branch 'master' into brew_themes_user_selection 2024-07-22 22:46:12 +02:00
Víctor Losada Hernández
24c950227a Merge branch 'master' into scroll-to-element 2024-07-22 22:43:43 +02:00
Trevor Buckner
6ae249a527 Lint 2024-07-22 02:46:26 -04:00
Trevor Buckner
c0123b96eb Support snippet compilation
Original handling of snippets only worked if the current selected theme was a staticTheme. This now fully merges all snippets through the theme chain no matter what the top-level theme is. So user themes built on 5ePHB can benefit from 5ePHB snippets too.

User input of user snippets will be a later PR, but merging them into static snippets is now supported.
2024-07-22 02:44:41 -04:00
Trevor Buckner
45f7080afd Move loadAllBrewStylesAndSnippets to the parent page component
Themes contain both CSS and Snippets. The brewRenderer only cares about the CSS, but other components need the Snippets. Better to have the parent "editPage", etc. load the theme bundles and pass them down to each child that needs it, rather than trying to pass from the child up.

This also fixes the `metadataEditor.jsx` not being able to change themes live; A new theme bundle is now loaded when a new theme is selected, instead of only the first time the BrewRenderer mounts.

Also renamed to "fetchThemeBundle"
2024-07-21 16:25:24 -04:00
David Bolack
2af2ad629d Try to account for situations where the URL folding is past the max length for the truncation so the user can see why this is a fold.
Remove missed debug messages.
2024-07-21 12:58:21 -05:00
David Bolack
2fc7aa454f Add data: URL folding for CSS.
Regex might need tweaking to catch all cases, but it catches the basics.
2024-07-21 12:40:49 -05:00
Víctor Losada Hernández
ddf2006285 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into experimental-development 2024-07-21 18:06:08 +02:00
David Bolack
fde797c044 Rename prevLine to activeLine for better reading clarity. 2024-07-20 21:51:03 -05:00
David Bolack
6693fb1c13 reduce redundant trim()s 2024-07-20 21:40:22 -05:00
G.Ambatte
17f8de48a8 Add disableMeta prop to SharePage 2024-07-21 13:33:23 +12:00
Trevor Buckner
0a5ff213de use same theme endpoint for user and static themes
`getThemeBundle()` rework no longer needs two separate endpoints
2024-07-20 11:39:23 -04:00
G.Ambatte
aebfcc7885 Add new var math functions 2024-07-21 00:18:06 +12:00
David Bolack
2c4f3473e5 Trim the trailing { on a CSS fold. 2024-07-20 00:43:02 -05:00
G.Ambatte
9a4cc5f63e Add @import folding 2024-07-20 14:57:09 +12:00
David Bolack
c82b62f953 Add Code folding on CSS style tab 2024-07-19 16:03:44 -05:00
Víctor Losada Hernández
df265ffc8a Merge branch 'master' of https://github.com/naturalcrit/homebrewery into metadata-api-endpoint 2024-07-19 08:59:04 +02:00
Víctor Losada Hernández
73a400b882 Merge branch 'metadata-api-endpoint' of https://github.com/naturalcrit/homebrewery into metadata-api-endpoint 2024-07-19 08:58:21 +02:00
Víctor Losada Hernández
bcef4006dc Remove console.log statement in /metadata/:id route handler 2024-07-19 08:58:19 +02:00
Trevor Buckner
f364f054f8 restore renderStyle
`renderStyle` is still necessary; it allows us to update the style live in the component render step as the user types into the style tab. Otherwise the style is only rendered once and never updates.

React also discourages directly editing the DOM ourselves, because it makes changes to the DOM that react cannot track; we should aim to provide all DOM writes inside of the component render function instead of using `document.createElement`, etc.

Too that end, this commit reduces the `loadAllStylesAndSnippets` function to just fetch and parse the data; actual rendering is moved back to `renderStyle()`
2024-07-19 01:33:56 -04:00
Trevor Buckner
460358ce1f Simplify some logic 2024-07-19 00:09:21 -04:00
Trevor Buckner
0448f15322 Classify user brews as V3 if they use V3
Each theme in the theme chain, including user brews, must use the same renderer. When moving to V4 or future versions, it will be important to distinguish which themes are compatible with each other
2024-07-19 00:05:45 -04:00
Trevor Buckner
d741878f78 Also remove userthemes from Brew object in sharePage 2024-07-19 00:00:06 -04:00
G.Ambatte
b55db94822 Merge branch 'master' into fixLinks-#3547 2024-07-17 15:07:47 +12:00
G.Ambatte
f830104531 Use textContent instead of innerText 2024-07-17 13:59:00 +12:00
Trevor Buckner
d22cd88446 fix crash in metadataeditor 2024-07-15 23:47:19 -04:00
Trevor Buckner
1444581c86 pass userThemes prop to Editor -> MetadataEditor 2024-07-15 23:44:07 -04:00
Trevor Buckner
dfbd85a8ce pass userThemes as a new prop, rather than inside of the brew 2024-07-15 23:29:16 -04:00
Trevor Buckner
af5434c9b7 cleanup 2024-07-15 16:45:55 -04:00
Trevor Buckner
484b0a6dff simplify getThemeBundle() by using just one loop
Also, removes need for special handling of the "first" theme.
2024-07-15 16:38:19 -04:00
Trevor Buckner
4951b9bf1a Add async error handler to /edit and /new
Since /edit and /new endpoints now have an `await` inside that could return an error (`getUsersBrewThemes()`), asyncHandler must be added to pass errors along instead of just crashing
2024-07-13 19:46:12 -04:00
Trevor Buckner
62c619de24 userThemes need not be nested inside a Brew object 2024-07-13 19:38:51 -04:00
Trevor Buckner
44c96aad04 spacing 2024-07-13 18:11:04 -04:00
Trevor Buckner
f392216ff4 Spacing 2024-07-13 18:08:29 -04:00
Trevor Buckner
591cae0e8f more renaming engine to renderer 2024-07-13 18:08:00 -04:00