100 Commits
Author SHA1 Message Date
Gazook89 eddc1421b2 Merge branch 'master' into Accessible-Dropdowns 2026-08-15 12:05:00 -05:00
Gazook89 88720aadce add initial-value 2026-08-15 12:02:58 -05:00
Gazook89 33ab44a039 Update package-lock.json 2026-08-15 10:36:23 -05:00
Gazook89 480c5c3eb6 update div to button.
conflict resolution with #4932-- preserves the intention of that PR, but with new structure of this PR.
2026-08-15 10:36:15 -05:00
Gazook89 1cf338b3e1 Merge branch 'master' into Nav.jsx-To-Functional-Component 2026-08-15 10:21:52 -05:00
Gazook89 caeeabc735 fixes to colors, and editor wrapping breakpoint. 2026-07-27 21:47:58 -05:00
Gazook89 4e5e5986cd refactor nav.jsx into functional component
Mostly a straightforward change to a functional component.  Smaller refactors include removing `_.omit` which isn't needed.
2026-07-13 22:41:42 -05:00
Gazook89 fd6fd98fdc Add @components aliases to vite config
And update all the files to point to that directory to use the alias.
2026-07-11 17:41:49 -05:00
Gazook89 fe297a47b2 cleanup extra css
Remove some unused css rules that weren't cut before, and a little bit of rearranging to group "dropdown" stuff together and "tools" together.
2026-07-09 14:14:21 -05:00
Gazook89 5d67d48436 Add custom properties to dropdown.less
Adds registered custom properties to the dropdown menus, which can be set in another stylesheet at any level (either on the direct element or on an ancestor) or use the default values given.
2026-07-09 14:13:22 -05:00
Gazook89 794c2fa09d add disabled attribute to items. beta to status
Adds the `disabled` attribute to a menu-item button if it's disabled, not just as a className.  Styling changes centered on that as well.

Also changes the `beta` class to `status` because it is used for both `beta` and `disabled` indicators.  Styling changes for that.
2026-07-09 14:10:49 -05:00
Gazook89 c5db25f076 set a relative color on menu triggers when open 2026-07-08 23:36:08 -05:00
Gazook89 6f1ad35492 add aria labels to items 2026-07-08 23:35:45 -05:00
Gazook89 5c4d498a99 add contain: content
tiny change for tiny performance
2026-07-08 22:26:37 -05:00
Gazook89 2e3f69b478 Remove unnecessary styling on .menu-wrapper
The styling in the dropdown.less file targeting `.menu-wrapper` was not doing anything.  Double checked on old firefox, too, in case it was needed for oddbird polyfill.
2026-07-08 22:09:25 -05:00
Gazook89 8e720d1c60 Set html structure to ul/li. Set roles.
The snippets are a `menubar` in terms of role, and is a list of items (`menitem`, `li`).

Note for myself:  submenus are `menu` roles that immediately follow their triggering `menuitem` and are direct children of the parent `menu`, per WCAG.  This is done in this commit.
2026-07-08 22:06:00 -05:00
Gazook89 f6f4faba27 remove tests 2026-07-07 20:44:01 -05:00
Gazook89 f67ab5bb16 update brewRenderer.jsx 2026-07-04 20:25:01 -05:00
Gazook89 9048253c9c revert some unintended changes from an earlier merge
commit e02ce4f898 unintentionally undid some changes for v4 by dbolack, I'm not really sure how.  It's evidently not possible to directly "revert" those changes without having a conflicted file, i think something was borked in the process.

manually reverting the changes here, hopefully it works out.
2026-07-04 20:16:02 -05:00
Gazook89 416161e617 fix to previous commit. 2026-07-02 23:44:19 -05:00
Gazook89 3836150e42 hide arrows on snippetbar triggers, improve spacing
to decrease the width used for the snippet bar triggers, removed the down arrows (for the top level triggers only).  And, reduced the padding on the icons in the snippetbar while retaining it inside the menus.

The icons still align between the menu list and the menu trigger, but the text labels do not.
2026-07-02 23:40:01 -05:00
Gazook89 b62dc7e5c9 Update package-lock.json 2026-07-02 23:15:08 -05:00
Gazook89 5c50f35570 Merge branch 'master' into Better-Dropdowns 2026-07-02 23:08:37 -05:00
Gazook89 2164f7ae9d Merge remote-tracking branch 'upstream/master' 2026-07-02 23:08:22 -05:00
Gazook89 b791bcefdb revert the work done in earlier commit with anchor properties
revert commit 1fe19578c2 which changed `anchor()` values to `position-area`.

I'm not sure what compelled me to do that change initially, except the easier to understand syntax.  Hopefully it wasn't important.

But oddbird polyfill expects `anchor()` values, which it converts to pixel values for positioning.
2026-07-02 22:53:33 -05:00
Gazook89 1fe19578c2 change anchor method
This updates the position try results by using a different method of setting the area of the anchored element.  Rather than using the inset properties with `anchor()`, it uses `position-area`.
2026-06-10 16:28:34 -05:00
Gazook89 6e86b1001c Update package-lock.json 2026-06-10 12:34:14 -05:00
Gazook89 80e14898be Update package-lock.json 2026-06-10 12:31:29 -05:00
Gazook89 e02ce4f898 Merge remote-tracking branch 'upstream/master' 2026-06-10 12:30:33 -05:00
Gazook89 1861d036b9 add key to dropdown menuitem 2026-06-09 06:25:31 -05:00
Gazook89 a3469a172a Move tests to tests/components directory 2026-05-29 15:58:00 -05:00
Gazook89 cf8f809eec Cleanup some loose ends. 2026-05-29 15:57:41 -05:00
Gazook89 03890fd329 Update package-lock.json 2026-05-29 13:03:40 -05:00
Gazook89 9c21e6dc8e update the reset to better vertically align icons 2026-05-29 11:38:14 -05:00
Gazook89 fa07af2d82 Add tests for the Dropdown structure and behavior
Largely this is written by an LLM after I provided the targets, and I've looked through the tests themselves to confirm they are accurate.  There may be improvements in how to actually *set up* the tests, though, as I am less familiar with those.

This has two test suites:  the first for html structure, the second for behavior.  Each of them calls another script that provides helper functions for setting things up and taking them down.  This keeps the test suites themselves fairly lean.
2026-05-29 11:08:05 -05:00
Gazook89 f716c390b9 Add some defaults to dropdown 2026-05-29 10:54:58 -05:00
Gazook89 e7df5d1160 remove experimental/beta tags on snippets. 2026-05-28 21:28:52 -05:00
Gazook89 bb3f6fe642 remove nonexistent icons. 2026-05-28 21:05:12 -05:00
Gazook89 af0804fd6f Remove non-existent icons 2026-05-28 11:46:12 -05:00
Gazook89 c12a188196 Be sure snippet icon is getting passed in 2026-05-28 11:45:14 -05:00
Gazook89 13196941eb popovertarget is typically not camelcase in html 2026-05-28 11:43:33 -05:00
Gazook89 3110d2cc69 Add icons to menu triggers
This fixes the odd alignments of menu-wrapper names by ensuring that both menuitems and menu-wrappers (actually their child triggers) both have space for icons.
2026-05-28 11:43:05 -05:00
Gazook89 2e4439c9f4 Remove ID collisions on repeated menu names
Add React `useId()` method, safely stripped of invalid characters for use in CSS/HTML, to make each trigger/menu unique to avoid collisions.
2026-05-28 11:41:27 -05:00
Gazook89 5e122626d4 Merge branch 'master' into Better-Dropdowns 2026-05-27 22:22:34 -05:00
Gazook89 2812f30ac1 Merge remote-tracking branch 'upstream/master' 2026-05-27 22:21:54 -05:00
Gazook89 612614fa12 menu items dismiss menu on click by default
Unless a menu item has the `no-dismiss` attribute (set to either `''` or `'true'`), clicking a menu item will dismiss the menu.  Clicking a submenu trigger will not dismiss the menu.

The `no-dismiss` attribute must take a string, either empty or `'true'` because react doesn't allow boolean custom attributes.
2026-05-27 22:21:28 -05:00
Gazook89 f5acb27c34 Revert "Fix font snippet "Open Sans""
This reverts commit 34d634a349.
2026-05-05 22:38:43 -05:00
Gazook89 a34a5d187b Fix issue with closing brace not highlighting 2026-05-02 15:36:56 -05:00
Gazook89 34d634a349 Fix font snippet "Open Sans"
Previously it was using 'OpenSans' as the font name, when it's actually 'Open Sans'.
2026-05-01 15:17:30 -05:00
Gazook89 137b6bc690 remove unused 300 & 600 font weights
Only 400 and "800" are used in the codebase for Open Sans.  And, we've only ever had up to 700 as available weights, so everything that is set to "800" is actually getting weight 700 (which looks better).
2026-05-01 11:03:52 -05:00
Gazook89 d3566d896b Move Code Bold/Light to fonts directory 2026-04-30 22:28:56 -05:00
Gazook89 e34c5f9b32 Add font files, remove google fonts references
Adds a `shared/naturalcrit/styles/fonts` directory, and Open Sans font files for the 4 weights we were pulling from Google Fonts.
2026-04-30 22:28:04 -05:00
Gazook89 d79c4d92f5 Merge remote-tracking branch 'upstream/master' 2026-04-30 21:25:21 -05:00
Gazook89 9935f54080 Update variables.test.js 2026-04-30 21:11:33 -05:00
Gazook89 9af2577c6e Add print cycle events and loading msg
Since the print cycle now loads all images not-yet-loaded (due to lazy loading), there can be a moment of time where it appears pressing Get PDF is doing nothing, depending on connection speed.  To add a "loading" message, a custom event is fired at the start and end of the print cycle (before the print dialog comes up).
2026-04-30 21:05:08 -05:00
Gazook89 d04f401c90 Fix lazy loading Print issues
When initiating the print dialog, it first grabs all img elements with `loading="lazy"` attribute, flips that to `eager`,  and then waits for every image to load before resolving a promise and opening the Print dialog.
2026-04-29 23:38:37 -05:00
Gazook89 a973a5db0d Update mustache-syntax.test.js 2026-04-28 22:51:27 -05:00
Gazook89 a2e5688ede Add lazy loading to images 2026-04-28 22:21:35 -05:00
Gazook89 00efbb7244 fix state variable themeSelector 2026-04-26 21:09:18 -05:00
Gazook89 d368e53b30 add some comments 2026-04-26 10:44:52 -05:00
Gazook89 5b11827c56 fix disabled attribute 2026-04-25 23:33:04 -05:00
Gazook89 4d3179fc35 remove unused less file 2026-04-25 23:32:48 -05:00
Gazook89andCopilot d686c78fdf fix oddbird polyfill so custom properties are used correctly
Co-authored-by: Copilot <copilot@github.com>
2026-04-25 22:16:25 -05:00
Gazook89 359d87440b add oddbird polyfill - not quite working
Not quite working yet.  polyfill is loaded, but positioned elements are spanning whole viewport.  Parking this for now.
2026-04-24 22:06:52 -05:00
Gazook89 87ed5d107d add jsdoc documentation. 2026-04-24 20:32:05 -05:00
Gazook89 c0c4db95a4 remove id attribute from component 2026-04-24 10:19:16 -05:00
Gazook89 285522d820 all snippet buttons are actually buttons now 2026-04-23 22:56:29 -05:00
Gazook89 904b14af19 icons in triggers and menus are aligned. 2026-04-23 22:52:39 -05:00
Gazook89 0c78a23c76 remove testing menu 2026-04-23 22:28:21 -05:00
Gazook89 992b72ee6f empty menus styled as disabled 2026-04-23 22:17:52 -05:00
Gazook89andCopilot 8bebbdac5d restore styling to work with new structure.
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 22:10:51 -05:00
Gazook89 4f953da0fe caret menu indicators work, point correct direction 2026-04-23 10:54:27 -05:00
Gazook89andCopilot 3b6c7acdbf snippet submenu triggers don't fire events onclick
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 10:42:58 -05:00
Gazook89andCopilot 2232d5265f Add basic nesting dropdown component
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 10:21:52 -05:00
Gazook89 b5cd7b7a40 package-lock change? 2026-04-23 10:21:20 -05:00
Gazook89 dc8ff1ceab Merge remote-tracking branch 'upstream/master' 2026-04-22 21:38:38 -05:00
Gazook89 399f04d0b4 Merge remote-tracking branch 'upstream/master' 2026-04-08 22:02:08 -05:00
Gazook89 9f6ec87101 Update package-lock.json 2026-03-09 15:35:13 -05:00
Gazook89 f8683ebbc8 Update custom snippets to allow inline
Removes the additional line after a snippet, so it doesn't effectively create a `\n` at the end of the snippet.  This allows snippets to be inline with text.
2026-02-22 22:38:01 -06:00
Gazook89 f9f33955bc Merge branch 'master' into move-codeEditor-to-components 2025-11-09 23:30:53 -06:00
Gazook89 2ce13f61e1 update relative paths to absolute paths 2025-11-09 23:29:55 -06:00
Gazook89 6db4bf2274 Merge branch 'master' into Move-Nav.JSX 2025-11-09 23:24:21 -06:00
Gazook89 c5aa774daa Move markdown.js and markdownlegacy.js
Moves the two files up a level, directly in `/shared/`.  Everything else is just updating paths for that.
2025-11-04 22:29:28 -06:00
Gazook89 29fe6430ce Move codeEditor to components directory
This simply moves the codeEditor folder to the components directory.  `codeEditor.jsx` simply builds a component which is then used elsewhere, and isn't shared between client and server, so it should be in the client directory.

Arguably it could go in `client/homebrew/editor` but I think the `/homebrew/` folder should be eliminated down the line and it's contents just re-sorted.

When working on the editor right now it's a pain to switch between `shared` and `client` hunting for the right file.
2025-11-04 13:12:56 -06:00
Gazook89 c38cc77fd0 Move SVG components to components folder
Move the SVGs out of the `shared` directory, closer to where they are actually used.  They are svg jsx files, setup as components, so i've moved them to the components directory.

Deleted `combat.svg.jsx` because we don't use it anywhere.

renamed the remaining two to be more descriptive of the image for additional clarity.
2025-11-04 12:52:12 -06:00
Gazook89 fc569e560b Move renderWarnings from shared to client
Moving this component to the component folder so it's closer to where it is actually used.  Not moving to the `homebrew` folder because ultimately i think pretty much everything in that folder should move to the components as well (`homebrew` isn't a helpful folder distinction).

Deletes a directory, moves 2 files.
2025-11-03 21:50:31 -06:00
Gazook89 081fd6f39d Move nav.jsx from shared to client directory
Moving the one file, changing a lot of imports (18 files), and deleting a directory.
2025-11-03 20:58:00 -06:00
Gazook89 1a56c393ab Merge branch 'master' into Update-core-and-reset 2024-11-10 21:50:03 -06: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 4bad047f93 Merge branch 'master' into Intersection-Observer 2024-11-10 15:56:03 -06:00
Gazook89 234d484a74 Merge remote-tracking branch 'upstream/master' 2024-11-10 15:55:54 -06:00
Gazook89 bc5a9c9039 lint 2024-11-08 21:57:13 -06:00
Gazook89 f7dfedcd44 give dismisskeys a default 2024-11-08 21:57:13 -06:00
Gazook89 b7b1981bde lint 2024-11-08 21:56:45 -06:00
Gazook89 2e8368d08c give dismisskeys a default 2024-11-08 21:56:35 -06:00
Gazook89 28a7f24989 add scrollToHash method back in
pretty much completely unchanged, was originally moved just to help with merging master in (ie it was erroneously removed)
2024-11-07 20:32:30 -06:00
Gazook89 28855d02a6 dynamic text input width to match characters 2024-11-07 19:46:07 -06:00
Gazook89 650ec04417 fix 'disabled' attribute on min/max of page range 2024-11-07 18:56:19 -06:00
Gazook89 9ef11bca99 lint and refactor 2024-11-07 10:40:44 -06:00
Gazook89 88b34a7ba3 Fix 'current page' input when zoomed in close
When the page is zoomed in very close, such that <30% of the page is in view, it doesn't register changes to the 'current page'.  This fixes that, passing in the 'centerPage' if 'visiblePages' is empty.

I don't love this fix, i think the visiblePages should always have *something* in it, but I can't quite figure out how to set that (since the normal update to visiblePages is happening in an observer that doesn't fire if nothing is in view).
2024-11-07 10:17:43 -06:00