Gazook89
499c640a11
Move the Toolbar component out of the iframe
...
The website UI should stay out of the iframe if possible. Otherwise, users can style the UI on their brew which may or may not be a pain, and it's simple enough to avoid it.
2024-08-18 18:50:36 -05:00
Gazook89
5a11b7918e
refactor slider onChange and button onClick
...
Moved the zoomLevel state assignment to a newer useState hook function, making it easier (and shorter) to update that state within event handlers.
The slider onChange is a single easy line, and the buttons handlers are two lines for clarity.
2024-08-18 00:02:49 -05:00
Gazook89
36ab6923ed
remove zoomInput state property
...
zoomLevel and zoomInput should always be the same, so I've removed one.
2024-08-17 23:43:32 -05:00
Gazook89
7cc967ad49
setZoomLevel to no longer use if/else
...
Remove the 'in'/'out' parameter of the function and just have the buttons send postive or negative integers equal to the desired change in the zoom. No need for if/else statements using strings.
2024-08-17 23:39:59 -05:00
Gazook89
d108088295
remove unneeded handler
2024-08-17 21:23:12 -05:00
Gazook89
8be3154865
rename functions/attributes
...
updateZoom() => handleZoom
updateZoom prop => onZoomChange
More clarity of prop versus handler function.
2024-08-17 20:48:30 -05:00
Gazook89
9aa7c67c5b
remove "makeZoom" function
...
The makeZoom function is redundant if we just insert the style a little further down when the `.pages` div is initialized, as a `style` attribute on the tag.
2024-08-17 20:41:59 -05:00
Gazook89
5a84c0aaa7
Merge branch 'pr/3499' into Simplify-Zoom-Slider
2024-08-17 20:22:57 -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
efb4c67e2a
use zoom icons rather than text
2024-08-17 15:40:52 -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
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
032fcf12e0
"Removed dynamic generation of zoom levels in datalist, replaced with a single static option of 100%"
2024-08-17 11:39:22 +02: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
9dde4aa94e
Merge branch 'pdf-tools' of https://github.com/5e-Cleric/homebrewery into pdf-tools
2024-08-15 17:46:49 +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
David Bolack
81a098b6cf
Merge branch 'master' into Issue_241
2024-08-15 09:40:23 -05:00
David Bolack
aa2fe3ef97
Merge branch 'master' into FalsePaths
2024-08-13 22:12:03 -05:00
Trevor Buckner
31fcf28e3f
Merge pull request #3631 from naturalcrit/v3.14.1
...
Up to v3.14.1
v3.14.1
2024-08-13 17:11:08 -04:00
Trevor Buckner
aa945c4177
Up to v3.14.1
2024-08-13 17:08:59 -04:00
David Bolack
fc6930c868
Merge branch 'master' into Issue_241
2024-08-13 12:17:45 -05:00
David Bolack
1ed7e43db1
Implement G-Ambette's cleaner fix.
2024-08-13 12:09:45 -05:00
David Bolack
6ec51bf725
Revert "Prevent loading of undefined renderer or theme themebundle."
...
This reverts commit 136e877ee6 .
2024-08-13 12:09:26 -05:00
David Bolack
136e877ee6
Prevent loading of undefined renderer or theme themebundle.
2024-08-12 21:42:25 -05:00
Trevor Buckner
cbc6dcdc35
Merge pull request #3625 from G-Ambatte/fixVarNameAsParam-#3622
...
Tweak variable math split regex
2024-08-11 23:01:38 -04:00
Trevor Buckner
5894dc5a7a
Merge branch 'master' into fixVarNameAsParam-#3622
2024-08-11 21:59:58 -04:00
Trevor Buckner
284bfe565b
Merge pull request #3624 from G-Ambatte/fixVarNameSubstringClash-#3613
...
Fix var name substring clash #3613
2024-08-11 21:49:31 -04:00
G.Ambatte
075c8805e0
Merge branch 'fixVarNameAsParam-#3622' of https://github.com/G-Ambatte/homebrewery into fixVarNameAsParam-#3622
2024-08-10 08:24:23 +12:00
G.Ambatte
5c4187cd06
Add variable names as function parameter tests
2024-08-10 08:24:16 +12:00
G.Ambatte
1719cc68fa
Merge branch 'master' into fixVarNameAsParam-#3622
2024-08-10 08:23:23 +12:00
G.Ambatte
3ba67fb3d0
Merge branch 'master' into fixVarNameSubstringClash-#3613
2024-08-10 07:56:04 +12:00
G.Ambatte
f58d52c4b6
Add comma to var math split regex
2024-08-10 07:54:50 +12:00
Trevor Buckner
e1ad6f8114
Merge pull request #3588 from G-Ambatte/fixInfoPanel-#3586
...
Add disableMeta prop to SharePage
2024-08-09 10:55:27 -04: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
G.Ambatte
3eb0c7acfe
Add variable name checks
2024-08-09 17:42:15 +12:00
G.Ambatte
c3e6c01ec1
Fix typo in regex
2024-08-09 15:33:28 +12:00