Commit Graph

92 Commits

Author SHA1 Message Date
megayu
d6403b7746 dependencies upgrade (#12460) 2026-03-23 21:32:28 +08:00
scheinriese
b076ce9fc0 Make kbd top inset glow transparent in light mode for better vertical centering
The white-on-white highlight was invisible yet shifted perceived letter
center downward. Variable is preserved so custom themes can still set it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
00e2a91f25 Refine key press animation with theme-aware glow and brightness filter
- Replace hardcoded rgba shadow colors with --kbd-glow-top/--kbd-glow-bottom
  CSS variables, tuned per theme (light: stronger top highlight, dark: deeper
  bottom shadow)
- Use filter: brightness(0.92) for pressed state instead of manipulating
  box-shadow layers with outer drop shadows — theme-agnostic and physically
  correct (depressed key = in shadow = darker)
- Keep top inset highlight shift (1px → 2px) and bottom inset compression
  (1px → 0.5px) for realistic keycap depression alongside brightness
- Fix bottom clipping on press: change .action-wrap overflow from hidden
  to visible so translateY(1px) doesn't get chopped
- Remove non-glow pressed shadow rules (brightness handles all cases)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
4dcdbcc44c Replace flat row flash with accent shimmer sweep and fix combo key press animation
- Row highlight on shortcut trigger now uses a horizontal gradient sweep
  (background-position animation) instead of a static background flash,
  providing a distinct visual language from the focus ring
- Shimmer uses theme-aware accent color via color-mix on keymap page,
  with a neutral fallback in shui.css base styles
- Guard against animation spam: clearTimeout+reset pattern prevents
  stale timeout accumulation during rapid key repeat; reflow only
  forced on first trigger, class stays applied until last trigger ends
- Fix combo key press animation: animate the container (the keycap)
  instead of individual kbd elements, so translateY and box-shadow
  follow the container's border-radius correctly
- Scope row shimmer to .shui-shortcut-row/.shortcut-row elements
  to prevent accidental shimmer on standalone badge containers
- Respect prefers-reduced-motion for all new animations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
06d890f6ca Make keymap tab responsive with ResizeObserver-based width sync
The settings article has a fixed CSS width (44rem) for dialog intrinsic
sizing, but when the viewport constrains the dialog, the inner flex
container overflows and gets clipped. CSS percentages resolve against
the declared width, not the rendered width, so a JS solution is needed.

A ResizeObserver on the dialog element measures its actual clientWidth,
subtracts the aside (only in row layout), and sets an explicit max-width
on the shortcut container. Also makes inner elements flexible: removes
flex-shrink-0 and min-width constraints on keystroke buttons, adds
flex-wrap to toolbar and shortcut rows, and adds min-width: 0 to
shortcut badge containers in shui.css.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
e09230476d Revert glow/shadow to hardcoded rgba — physical light simulation needs absolute colors
The inner glow uses white-on-top / black-on-bottom to simulate 3D keycap lighting.
Theme variables would swap these in dark mode, destroying the effect. Row-pressed
highlight still uses theme variable (accent tint, not physical light).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
4c5b7ca511 Address remaining should-fix items from pr-review
- Extract animate-element!/highlight-row! helpers in shortcut-press! (was 4x duplication)
- Extract matches-keystroke? predicate (was duplicated in count + render)
- Replace <a> tags with <button> for all interactive elements (remove, clear, reset, undo, toggle, refresh)
- Add aria-label to icon-only buttons for screen reader support
- Add button reset CSS for elements changed from <a> to <button>
- Replace hardcoded rgba colors in CSS glow/shadow/row-pressed with theme variables
- Define press-animation-ms constant (was magic number 160)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
ef215dccfc Add --lx/--rx color fallbacks for OG theme compatibility
Ensure shortcut component and shui shortcut badges work across both
Radix and legacy Logseq color themes by adding proper fallback chains:

- shortcut.css: Add --lx-* → --rx-* fallbacks for gray scale (08-12),
  --lx-* → --ls-* → --rx-* for background steps (01-04, 06), use
  opacity-based row dimming instead of color-based for theme-agnostic
  muting, and use --color-level-6 for icon link color
- shui.css: Add --rx-* fallbacks to bare --lx-* variables on shortcut
  key badges (background, border, text color, separator)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
7f8c11680a Polish shortcut redesign: remove interactive prop, wire up press animations
- Remove unused `interactive?` prop from shortcut component and all call sites
- Trigger `shortcut-press!` animation when shortcuts are invoked
- Update shortcut settings UI to use `shui/shortcut` instead of raw `<code>` elements
- Fix shortcut key min-width (fit-content → 20px) for consistent sizing
- Pass raw-binding through `render-keyboard-shortcut` for data attribute matching

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
67c123b4ed Redesign keyboard shortcut component with 3 display modes
Replace the single-style shortcut renderer with a new component
supporting combo (simultaneous keys), separate (sequential keys),
and compact (text-only) display styles with auto-detection.

- Add shortcut-press! for triggering key press animations via DOM
- Add CSS for all 3 styles with glow effects and reduced-motion support
- Update CMD+K to use v2 styles and press animations on Enter/Cmd+C
- Add accessibility defaults (interactive?/aria-hidden?) to consumers
- Remove old v1 namespace, consolidate under logseq.shui.shortcut
- Remove unused size/theme/animate-on-press? params from API
2026-03-13 20:45:58 +08:00
Charlie
a0a19a91fa feat: new authenticate UI (#12172)
* enhance(ui): login form

* enhance(ui): add localization support with translate and locale management

* enhance(ui): WIP implement new authentication forms with context management

* enhance(ui): add password visibility toggle to input row

* enhance(ui): adjust padding for password visibility toggle

* enhance(i18n): implement internationalization support for authentication UI

* enhance(ui): implement sign in and sign up functionality with loading state

* enhance(ui): add session management and error handling in login form

* enhance(ui): add confirm code form and enhance authentication flow

* enhance(ui): improve sign-in flow and confirm code handling

* enhance(ui): add warning variant to alerts and improve error handling

* enhance(ui): implement countdown timer for code resend functionality

* enhance(ui): implement countdown timer for password reset and enhance login flow

* enhance(ui): export authentication and enhance UI components

* enhance(ui): integrate new login component and refresh token handling

* chore: clear amplify related codes

* enhance(i18n): normalize language codes and update locale handling

* enhance(auth): add multilingual support for signup and password reset flows

* enhance(ui): update login styles to inherit text color

* enhance(ui): adjust input color variables for improved accessibility

* enhance(auth): add password policy validation and tips in multiple languages

* enhance(ui): improve localization handling and update alert styles

* enhance(mobile): enhance login modal styling and accessibility

* fix(ui): update password validation regex for special characters

* enhance(ui): add padding to card header in login dialog

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2025-10-28 16:55:43 +08:00
Tienson Qin
f9cf6adcff fix: card modal blink when switching to the next card 2025-06-11 19:20:55 +08:00
charlie
2bc243da0d enhance(ui): improvements for the narrow screen 2025-03-25 14:58:29 +08:00
charlie
f0124e0ac0 enhance(ui): improve popup management and restore last saved cursor functionality 2025-03-07 17:07:05 +08:00
Tienson Qin
223928343a Merge branch 'refactor/tag-as-type' into feat/repeated-tasks 2024-12-22 14:46:31 +08:00
Tienson Qin
b194891cd8 enhance: move repeat settings to the right of datepicker 2024-12-20 20:59:28 +08:00
charlie
96fb8da599 enhance(ui): add ghost shui button for the toolbar 2024-12-19 17:51:33 +08:00
charlie
d55b07b0ba enhance: delete btn for the date property picker 2024-09-11 15:34:06 +08:00
charlie
11ba4b2ad7 enhance(ui): polish date picker 2024-09-10 22:00:28 +08:00
Tienson Qin
f336324b8e enhance: date picker year/month use shui ui 2024-09-10 21:03:40 +08:00
charlie
f2fb3658d1 enhance(ui): polish details for the shui datepicker 2024-09-03 17:36:06 +08:00
charlie
7e50deba24 enhance(ui): add custom month picker for the shui date picker 2024-09-03 17:29:36 +08:00
charlie
e1e2678622 fix(ui): default text color for the select menu content 2024-08-28 12:54:36 +08:00
charlie
41e2ae0e41 enhance(ui): polish navigation details for the shui datapicker 2024-08-28 10:50:37 +08:00
charlie
a1ee76edc5 fix(ui): default text color for the sub menu content 2024-08-28 10:06:25 +08:00
charlie
c5010b6679 enhance(ux): months/years navigation for shui datepicker 2024-08-27 20:00:36 +08:00
charlie
86722711f3 enhance(ux): months/years navigation for shui datepicker 2024-08-27 19:48:39 +08:00
charlie
4978574851 enhance(ui): support delete date option for the date picker 2024-08-27 18:57:22 +08:00
charlie
8444031518 enhance(ux): add month/year select for the shui datepicker 2024-08-27 14:37:04 +08:00
charlie
3d582c9cda enhance(ux): support do not remind me for the shui confirm dialog 2024-08-26 16:34:53 +08:00
charlie
8074b6a989 fix(ui): bg color vars for the radix menu content 2024-08-22 18:49:23 +08:00
charlie
91b39e7b55 enhance(ui): polish dropdown property editor 2024-08-21 09:22:43 +08:00
charlie
9ff589b6b9 enhance(ui): inherit global color for the popup foreground color 2024-07-22 13:28:19 +08:00
charlie
e4a1f723e2 enhance(ux): WIP page preview with the shui popups 2024-07-16 17:14:21 +08:00
charlie
d278067f8c enhance(ui): support hide close button option for the shui dialog 2024-06-26 10:01:54 +08:00
charlie
946499ad56 enhance(ui): support auto width for the shui dialog content 2024-06-25 18:06:13 +08:00
Tienson Qin
721a9e14ad fix: arrow color 2024-06-03 19:20:50 +08:00
charlie
ee51887265 enhance(ux): improve accessibility for the property creation 2024-05-29 22:47:37 +08:00
charlie
71a1929983 enhance(ui): WIP refactor the editor commands modals with the shui popups 2024-04-23 12:23:54 +08:00
charlie
4face39381 fix(ui): z-index of the shui select content 2024-04-15 20:14:34 +08:00
charlie
57af873bf4 enhance(ux): support more align position for the shui dialog 2024-04-08 11:40:36 +08:00
charlie
76f8fbffd0 enhance(ui): refactor the dropdown with the shui popup 2024-04-01 11:46:59 +08:00
charlie
bd26d0db0e fix(ui): the confirm dialog to uninstall plugin 2024-03-21 19:03:34 +08:00
charlie
b898a39ff2 enhance(ui): polish ui details for the property rows 2024-03-20 12:19:07 +08:00
charlie
78ffbaf456 enhance(ui): refactor the plugins modal with the shui dialog 2024-03-18 21:30:25 +08:00
charlie
26b7eac65d enhance(ux): polish property editor interaction 2024-03-14 23:57:21 +08:00
charlie
947e839180 enhance(ui): demos for the multi select 2024-03-12 18:00:47 +08:00
charlie
fd533cc41a enhance(ui): update demo 2024-03-12 16:53:51 +08:00
charlie
c681c6be8f enhance(ux): enhance hooks
for the multi select
2024-03-11 18:10:54 +08:00
charlie
44a4ecdcd0 enhance(ui): WIP enhance the multi select component for shui 2024-03-08 11:35:13 +08:00