0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-09 18:28:45 +00:00
Commit Graph

56 Commits

Author SHA1 Message Date
Víctor Losada Hernández d7585767c9 remove too strong shadow 2025-06-25 16:58:24 +02:00
Víctor Losada Hernández 75fe7b2c67 increase visibility of toolbar toggle 2025-05-07 11:57:41 +02:00
Víctor Losada Hernández 9b4047f3f9 small css changes 2025-04-21 20:12:42 +02:00
Víctor Losada Hernández 163e3927b5 style lint 2025-03-18 19:38:58 +01:00
G.Ambatte cf16566da8 Move Header Navigation button to Toolbar 2025-01-06 22:30:03 +13:00
Trevor Buckner 1b10a4001a Merge branch 'master' into pr/3845 2024-12-23 11:37:40 -05:00
Trevor Buckner bae9fe939d Merge branch 'master' into Intersection-Observer 2024-12-09 16:16:11 -05:00
Víctor Losada Hernández 2c5c3d40df revert toolbar changes 2024-12-09 22:08:39 +01:00
Víctor Losada Hernández eca0f59b40 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into adress-small-accessibility-concerns 2024-12-09 21:52:25 +01:00
Gazook89 9bc4b1fb56 Changes to core.less, reset.less, and toolbar
Making some changes to the reset.less so that some default UA button styling is removed.

Then, changing core.less so that the classic "HB" button styling is scoped to a certain class `.colorButton`.  This will make it easier to use the button element in other places.
2024-11-10 21:48:01 -06:00
Gazook89 28855d02a6 dynamic text input width to match characters 2024-11-07 19:46:07 -06:00
Gazook89 93b9f1d1da Merge branch 'Intersection-Observer' into Observer-Master-merge 2024-11-05 14:03:09 -06:00
Gazook89 b098d28407 linting 2024-11-04 14:08:06 -06:00
Gazook89 1be1b3b747 small accessibility changes. 2024-11-04 13:55:18 -06:00
Gazook89 4126188df1 linting 2024-10-21 22:29:58 -05:00
Gazook89 183dd63021 style change on page text input
Reduce the visual prominence of the page input by using a darker background and a text color that matches the rest of the toolbar icons.  Darker background still indicates this is an interactive item (is an input), hopefully.
2024-10-21 21:19:49 -05:00
Gazook89 41fdf48ad3 Setup Intersection Observers & more...
Bad commit here with too much stuff.  I apologize.

This sets up two Intersection Observers: the first captures every page that is at least 30% visible inside the `.pages` container, and the second captures every page that has at least one pixel on the horizontal center line of `.pages`.  Both can be arrays of integers (page index).

The "visiblePages" array is duplicated and formatted into a "formattedPages" state, which gets displayed in the toolbar.

The toolbar displays that, unless the user clicks into the page input and enters their own integer (only a single integer, no range), which can then jump the preview to that page on Enter or blur().

The Arrow 'change page' buttons jump the preview back and forth by a 'full set'.
 If one page is viewed at a time, this is moved on page a time, and if 10 pages are viewed at a time it jumps the pages by 10.

Left to do:  adapt the "jump editor to match preview" divider button to work with new "centerPage".
2024-10-21 00:30:45 -05:00
Gazook89 810c2140c9 move some toolbar specific styling to toolbar.less 2024-10-13 20:45:05 -05:00
Gazook89 96ae07a456 Small style change on checkbox inputs 2024-10-13 09:39:41 -05:00
Gazook89 b58b9ca8f0 Merge branch 'View-Modes-Radio-Options' into View-Modes 2024-10-12 11:06:09 -05:00
Gazook89 6fca21b6ed set defaultValue of gap sliders
defaultValue matches the normal styled values of the gap property on the .pages element.

removed the "tooltip" that showed the current value from the range sliders inside the anchoredbox (the gap sliders).
2024-10-11 22:53:38 -05:00
Gazook89 395f2d16fa change view mode toggles to indiv buttons
Rather than a single button with three states, it is three buttons.  Went with buttons with `role='radio'` rather than true radios mostly because that is what Radix does.
2024-10-11 22:06:41 -05:00
Víctor Losada Hernández 3e6884b506 dynamic input width 2024-10-11 00:32:28 +02:00
Gazook89 d6d6cc1e29 Add View Mode Options
Adds a new AnchoredBox component that is functionally a clone of the "saving error" notifications, but drops a lot of the JS in favor of the new (chrome-only!) CSS Anchor Positioning API.  In subsequent commits, either alternate styling or a polyfill will be added non-supported browsers.

The box contains a few inputs that modify the CSS applied to `.pages`, most critically a "start on right" toggle for the Facing Pages mode.
2024-10-06 21:51:44 -05:00
Gazook89 9fce94af63 Small CSS tweaks/display 'value' tooltip only if exists
The range slider should only display a tooltip for the value if the value attribute exists.  For example, the difference between controlled and uncontrolled inputs.

Update toolBar.less
2024-10-06 21:26:48 -05:00
Gazook89 49e072f03f Add button to toggle Preview tools
Toggles a state variable to either visible or hidden which is used to set a related class on the toolbar.  The hiding is done with CSS, just reducing the width of the toolbar and the opacity of the tools.
2024-09-04 13:54:55 -05:00
Gazook89 a7ddeafd06 revert change 2024-08-27 11:59:29 -05:00
Trevor Buckner 0ce3ac9be2 Merge branch 'master' into Fix-Toolbar-Positioning 2024-08-27 11:27:36 -04:00
Gazook89 a7c4b78ec8 set position relative, remove padding 2024-08-27 09:03:24 -05:00
Gazook89 7b767368df Change icons to mask-image
Removes icons as components, uses mask-image instead.

Sets a size on the .fac icons to 1em so by default they are 1em and retain their aspect ratio.

rename the icon files for consistency.
2024-08-26 15:51:35 -05:00
Trevor Buckner 5069eadd0a Manual tidying of .less files 2024-08-24 23:53:07 -04:00
Gazook89 f3ed174b0e eslint and stylelint
stylelint has a problem with the `:horizontal` pseudo selector in brewRenderer.jsx, which is being used to apply some styling to the custom scrollbars.  As far as i can tell, the selector is not standards-track, so that is probably why.  Not sure if we want to adjsut our stylelint config to allow it?
2024-08-23 19:16:59 -05:00
Gazook89 051eed0e83 restructure html, eliminate .tool divs
Treat each input and button as a direct child of the `.group` class, removing the intermediate div and reassign the `tool` classname to those inputs and buttons.  One item, the current / total page "set", is wrapped in a .tool div because they should be considered one item (even within the .group container).

And then a bunch of CSS adjustments to match the new structure.
2024-08-20 21:08:07 -05:00
Gazook89 2cf73698e8 white space lint 2024-08-19 23:38:48 -05:00
Gazook89 28a06348ab style tool groups, minor tweaks to spacing 2024-08-19 23:15:02 -05:00
Gazook89 37c8ea4fd7 Add total page count and some styling
Displaying the total page count near the current page number means we can lose the bottom right toolbar entirely (the renderer could be added to top toolbar, or just left for the metadata info in title bar).
2024-08-19 23:01:55 -05:00
Gazook89 05dd5e4c04 Change .toolbar position to absolute
Set as relative position, the toolbar (and mysteriously, the pageInfo box) would jump up 29px (toolbar height) when the "next page" button was clicked.  absolute pos fixes this.
2024-08-18 18:51:46 -05:00
Gazook89 4a6418a475 fix padding on sides of slider
Extra padding on the sides of a range slider extends the length of the slider, such that you can't move the thumb all the way to the end.
2024-08-17 18:08:33 -05:00
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