UI polish: headlessui controls + consistent sample indentation - #31
Merged
Merged
Conversation
…tent 2 spaces LESS_DATA was a template literal indented along with the surrounding source, so every line after the first carried 2-4 extra leading spaces. CodeMirror's default indentUnit is already 2 spaces; the sample now matches it.
- Replace the hand-rolled version dropdown (custom div + TODO) with a Listbox-based Select component; the "(experimental)" alpha entry and the latest-stable default are unchanged. - Math mode uses the same Select; Strict units is a headlessui Switch. - Shared palette/control styles in src/theme.less; header, options panel and error footer restyled consistently on the existing dark theme.
|
Warning Review limit reachedNext included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on
feat/v5-alpha-experimental(f91e359); this PR will show that commit until that branch merges.Indentation
LESS_DATAinsrc/utils.tswas a template literal indented with the surrounding source, so every line after the first carried 2-4 extra leading spaces. Dedented to a consistent 2 spaces (CodeMirror's defaultindentUnit).UI library:
@headlessui/vue1.7.23Headless, tree-shakeable,
vue ^3.2peer, works with Vite 2. OnlyListboxandSwitchare imported. Production bundle: 445.98 KiB → 470.15 KiB (gzip 152.21 → 159.86 KiB).src/components/Select.vue(new): Listbox-based select used for the version switcher and Math mode. Hand-rolled.version-select-clickdiv + its TODO removed.src/theme.less(new): shared palette (@base: #35495e),.controlbase styles.Header.vue: flex titlebar, Select for versions (alpha "(experimental)" entry first,latestdefault, prerelease dev-bundle URL rule, load-fail tip and balanced loading toggle all unchanged).App.vue: Math mode Select, Strict units Switch, restyled error footer.store/hash/render flow unchanged; still sendsstrictUnits.Layout.vue: panel borders/radius from the theme; dropped duplicated.loadingand genericlabel/selectrules.Verified in a browser: dropdown lists the alpha at top and stable versions below with 4.9.1 selected; switching to 4.1.3/4.7.0 recompiles the sample; Math mode and Strict units re-render and serialize to the URL hash; error footer shows on invalid input; title hides at narrow widths.