0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 02:42:39 +00:00
Commit Graph

229 Commits

Author SHA1 Message Date
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
Trevor Buckner
32fa50d608 Fallback to showing "Blank" theme if themes fail to load. 2024-07-29 12:30:13 -04:00
Trevor Buckner
82f73fb21d cleanup 2024-07-23 17:24:50 -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
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
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
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
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
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
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
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
Trevor Buckner
e4bde91f6a Merge branch 'master' into brew_themes_user_selection 2024-07-02 12:04:17 -04:00
Trevor Buckner
2cdd65b083 revert DOMPURIFY for now 2024-06-29 11:29:31 -04:00
David Bolack
7a349ae26d Remove weirdly redundant error box. 2024-06-13 18:13:32 -05:00
David Bolack
0945a5e47e Merge branch 'master' into brew_themes_user_selection 2024-06-13 15:15:30 -05:00
Trevor Buckner
fdf6acd80a Lint notificationPopup.less 2024-06-07 11:27:51 -04:00
G.Ambatte
476002ae4d Tweak notificationPopup.less
Stop the notification from covering the renderWarning when both are present
2024-06-07 11:01:47 +12:00
G.Ambatte
8c315980e9 Revert dismiss styling to opacity change on hover 2024-06-06 22:37:01 +12:00
G.Ambatte
359a64968c Nudge popups left 2024-06-06 22:31:05 +12:00
G.Ambatte
ed39852a8f Move dialog[open] to Dialog component styling 2024-06-06 22:00:28 +12:00
G.Ambatte
38fc647495 Change NotificationPopup to inline-block from block 2024-06-06 21:46:34 +12:00
G.Ambatte
9e041d26bd Fix display property on dialog causing close() to not work 2024-06-06 21:40:54 +12:00
Trevor Buckner
99ff7fdf14 linting 2024-06-04 12:32:21 -04:00
G.Ambatte
24e67e2270 Restore Info Circle to notification 2024-06-04 17:47:17 +12:00
G.Ambatte
5f6d5f53cc Change dismiss button to use fa-dismiss 2024-06-04 17:38:06 +12:00
G.Ambatte
05ba7b41d1 Tweak NotificationPopup 2024-06-04 17:29:34 +12:00
G.Ambatte
1111d8275c Tweak dismiss button styling 2024-06-04 17:27:45 +12:00
G.Ambatte
8685c5cae4 Break Dialog out of NotificationPopup, restore NotificationPopup to original position 2024-06-04 16:26:51 +12:00
Víctor Losada Hernández
a5f453f1e5 linting toolBar.less 2024-06-02 16:13:04 +02:00
Víctor Losada Hernández
0c9958f461 "Removed '%' symbol handling from zoom input value" 2024-06-02 16:05:57 +02:00
Víctor Losada Hernández
e2a3959feb "Update brewRenderer.less: changed padding-bottom to padding-block, removed empty lines, and reformatted some styles." 2024-06-02 16:03:54 +02:00
Víctor Losada Hernández
202ea1d905 "Removed margin-bottom from brewRenderer style, added padding-bottom and updated styles in brewRenderer.less" 2024-06-02 15:59:09 +02:00
Víctor Losada Hernández
e3c1e4b6f0 "Updated toolbar.less: changed hover selector to also include focus-within" 2024-06-02 15:50:47 +02:00
David Bolack
5442f232d5 Merge branch 'master' into brew_themes_user_selection 2024-05-31 22:32:14 -05:00
G.Ambatte
a6ce36689c Shift NotificationPopup to shared components & update BrewRenderer ref 2024-06-01 12:38:01 +12:00
Víctor Losada Hernández
3fad8227a7 "Updated brewRenderer.jsx: added id 'zoomStyle' to style tag and changed margin-bottom from 7cm to 5cm." 2024-06-01 00:50:16 +02:00
Víctor Losada Hernández
2d051fcdc0 misstype 2024-06-01 00:42:07 +02:00
Víctor Losada Hernández
95d7ce2876 move toolbar hiding to brewrenderer.less 2024-06-01 00:41:44 +02:00