0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 18:22:42 +00:00
Commit Graph

1812 Commits

Author SHA1 Message Date
Gazook89
b325779466 remove extra line breaks 2024-08-17 15:38:27 -05:00
Gazook89
0d475ab035 refactor some properties
Mostly change some properties from things like "transparent" to "unset".  A lot of things that are just overriding the default Naturalcrit "colored button".  Moved some properties to the top level `.toolbar` class and let it cascade down.
2024-08-17 15:38:00 -05:00
Gazook89
c791c0f60b modify the interactive states
more closely match the properties editor behavior.  removed some unnecessary (unused) properties.  Outline only appears when element is focused (rather than on hover as well).
2024-08-17 15:36:12 -05:00
Gazook89
f204b0ebc0 tool elements use width:auto for flexibility, but with min-width
Set the child elements of the toolbar to have auto width (can expand as needed), but have a min-width so no button, such as an icon, is too small.
2024-08-17 15:34:13 -05:00
Gazook89
adab8449e0 Change toolbar spacing
replace column-/row-gap with a single gap at 5px.  Padding on each child element will provide the space.  Set a height on toolbar, so child elements can be set to 100% height to improve bg color change on hover.
2024-08-17 15:32:30 -05:00
Gazook89
fc96f6bf95 text input changes (text-transform, radius, border, focus)
Aligning input here with Properties editor inputs.  Removed border radius, added thin border, a focus border.
2024-08-17 14:45:50 -05:00
Gazook89
9924c6049e Aesthetic changes to tooltip (radius, bg color)
Matching tooltip color to the background of the input it belongs to, for better cohesion.  Removed border-radius as well.
2024-08-17 14:26:45 -05:00
Gazook89
21e9251043 aesthetic changes (border, text align, font size)
Text align isn't doing anything, and no other UI element is using a border and doesn't seem necessary here.  Maintains the "flat" design.
2024-08-17 14:25:04 -05:00
Gazook89
19e6d94419 Set as Relative position, remove extra properties
Doesn't need to be Sticky positioning, relative is fine (it is still fixed above the iframe).  Allows us to remove a bunch of extra properties.

Add a smidgen of padding.
2024-08-17 14:23:33 -05:00
Gazook89
232f28b5b4 Remove extra styling of the slider thumb
can just use browser defaults for this.
2024-08-17 14:06:58 -05:00
Gazook89
6af5abd37d Rearrange nesting of slider tooltip
Just moving the :hover:after tooltip to within the existing css rule for sliders.
2024-08-17 14:06:14 -05:00
Gazook89
e0e49c606f Utilize browser defined style for slider, with accent-color
Avoid over-styling of browser-defined slider, but still apply a HB appropriate color scheme.  Prevents us from having to create our own tick marks, so we can just define the `option`s in the datalist and get tick marks in the right spot.
2024-08-17 14:05:14 -05:00
Gazook89
e9e49e39fb Set preview zoom to update with onChange
Commented out the existing onChange handler, switched the onMouseUp that actually applies the zoom to onChange.
2024-08-17 13:59:58 -05:00
Gazook89
ee4eb19f1e Run ESLint auto lint (spaces to tabs mostly) 2024-08-17 13:57:50 -05:00
Víctor Losada Hernández
5ee4ada112 "Updated ToolBar component: added zoom level limits, refactored zoom level handling, and modified CSS styles for input and slider elements." 2024-08-16 15:58:00 +02:00
Víctor Losada Hernández
f0765b5aaa "refactored ToolBar component to use a single state object, and updated styles in toolBar.less" 2024-08-15 20:05:23 +02:00
Víctor Losada Hernández
1452920fbd Merge branch 'master' of https://github.com/naturalcrit/homebrewery into pdf-tools 2024-08-15 17:41:27 +02:00
G.Ambatte
22257a95e0 Merge branch 'master' into fixInfoPanel-#3586 2024-08-09 18:06:07 +12:00
G.Ambatte
713c978f08 Add disableMeta to /migrate 2024-08-09 18:05:36 +12:00
Trevor Buckner
f1fd75574d Merge branch 'master' into CSSFolding 2024-08-08 17:51:05 -04:00
Trevor Buckner
3c8aaa7465 Update metadataEditor.less 2024-08-03 17:28:47 -04:00
G.Ambatte
8ef319d2cd Merge branch 'master' into fixSelectSelfInThemeSource-#3614 2024-08-03 16:35:17 +12:00
G.Ambatte
1513a983f7 Skip self when generating metadata dropdown list 2024-08-03 16:32:49 +12:00
David Bolack
d6bf2dec7e Merge branch 'master' into CSSFolding 2024-08-02 15:27:04 -05:00
Trevor Buckner
1d3c2d7cd6 Merge branch 'master' into fixInfoPanel-#3586 2024-08-01 15:57:43 -04:00
Trevor Buckner
6465564b6f Add route to Homebrew.jsx 2024-08-01 15:37:00 -04:00
David Bolack
957b1ed9e7 Merge branch 'master' into CSSFolding 2024-08-01 10:09:56 -05:00
G.Ambatte
758a951bf5 Merge branch 'master' into fixInfoPanel-#3586 2024-08-01 12:33:07 +12:00
Trevor Buckner
915f9aafa8 restore snippetBundle field somehow lost from /new and /home 2024-07-31 17:27:58 -04:00
Trevor Buckner
32fa50d608 Fallback to showing "Blank" theme if themes fail to load. 2024-07-29 12:30:13 -04:00
Trevor Buckner
8221579b6a Linting 2024-07-28 18:03:25 -04:00
Trevor Buckner
2870caaae6 Clean up metadataEditor theme dropdown 2024-07-28 17:18:30 -04:00
Trevor Buckner
8aa88a2e45 Add proper error popup when theme fails to load 2024-07-28 16:45:01 -04:00
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
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
Víctor Losada Hernández
270aa9e0f9 Merge branch 'master' into brew_themes_user_selection 2024-07-22 22:46:12 +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
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
David Bolack
c82b62f953 Add Code folding on CSS style tab 2024-07-19 16:03:44 -05: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