Commit Graph

40 Commits

Author SHA1 Message Date
boojack aa63737191 chore(web): upgrade @usememos/ui to 26.11.25 2026-11-17 23:18:15 +08:00
johnnyjoygh bb7114651e chore: upgrade ui lib 2026-11-13 09:13:37 +08:00
Johnny 9a08a7334f feat: add drawings with @usememos/canvas (#6533) 2026-11-09 08:25:09 +08:00
Johnny 99a7e33e77 feat(web): adopt @usememos/ui as the design system (#6528) 2026-11-06 08:25:06 +08:00
Johnny ca4d2a8125 fix(web): keep sidebar menus anchored while scrolling (#6474) 2026-10-15 07:44:31 +08:00
Johnny d5df8915f7 feat(auth): automatically start SSO when it is the only option (#6450) 2026-10-10 08:37:50 +08:00
ABird af38e75e2d refactor(api)!: drop the v1 version marker (#6447) 2026-10-08 21:49:37 +08:00
johnnyjoygh a80576a6de chore: polish space selector from the visibility menu
The composer's visibility control becomes AudienceMenu, a dropdown that
replaces the popover with a nested Space select, and it replaces the
Move to Space dialog.

- Visibility options come first, as two-line rows (label, then a
  description that wraps for long translations) in a 224px menu.
- Space is an optional row below them that never names the empty state:
  "Add to space" until one is chosen, then the Space itself. The
  selected Space in the submenu toggles back off (a check at rest, an ✕
  on hover, focus, or touch). A Space the author has left stays listed
  so it can be removed.
- Editing a top-level memo the user can manage now offers the Space row;
  comments never do, and a new memo composed inside a Space stays fixed
  to it. A Space change is saved with the edit, sending space and
  visibility together, and shows "Memo moved".
- The Move to Space dialog and its More submenu entry are removed.
- Copy: "Add to space", "Remove from {{space}}", the Space audience is
  now "Members · Everyone in {{space}}", shorter English descriptions,
  and short Russian visibility labels.

The sidebar scope menu gets the same row grammar: its Browse/Spaces half
and account half used different insets, icon sizes, row heights, and
text sizes. Every row now has 4px section padding, 28px height, 13px
text, and a 20px leading slot with a 14px glyph, so icons, the avatar,
and Space marks share a column and all text starts at the same x.
Section labels reuse SidebarSectionHeader, the Spaces "+" lines up with
the row chevrons, and the Inbox chip uses the 11px step.
2026-09-28 20:20:21 +08:00
johnnyjoygh 594ccd02c5 feat(editor): add Space selection to memo visibility setting
Close #6374
2026-09-27 20:58:27 +08:00
johnnyjoygh 0db0025d32 fix(web): show the Space mark beside the creator in the sidebar switcher
With a creator and a Space both selected, the switcher trigger showed
only
the creator avatar, hiding which Space was active. It now shows the
creator
avatar, a hairline slash, and the Space mark with its title; the creator
name moves to the tooltip so the Space title keeps the width.

User avatars are now always round, separating people from square Space
marks, and the instance logo keeps its square shape. In the trigger the
avatar draws 22px inside the Space mark's 24px slot so the solid circle
does not outweigh the pale tile.

Closes #6381
2026-09-27 08:57:37 +08:00
johnnyjoygh 200b4d0920 fix(web): keep preference submenus on screen in narrow viewports
When neither side of the user menu has room, the theme and language
submenus now fall back below the row, like nested submenus do, instead
of overflowing the viewport.
2026-09-27 08:12:39 +08:00
boojack 153625210b chore: open calendar and map to guests, simplify navigation
Calendar and Map are reading views like Timeline, so signed-out visitors
can now open them and see the memos readable to them. Their Space
variants still require sign-in, and composing stays signed-in only.

Navigation:
- Guests get Timeline, Calendar, Map; Attachments stays signed-in only.
  The About pill is gone; About lives in the scope menu and the common
  sidebar for everyone.
- One NavPill renders every nav control, from a single destination list.
- A memo list without a creator is Explore, so Timeline sends guests
  there directly instead of through the Home redirect.

Scope menu:
- One UserMenu for both cases: preferences, then account pages when
  signed in. Guests sign in from the sidebar footer only.
- Guests no longer see a Browse control whose only option is Explore.
- Theme and Language are submenus instead of dialogs; a choice applies
  at once, saved to the account or kept locally for guests.
- The system theme listener reads the latest preference, so local guest
  choices follow OS changes correctly.
2026-09-26 17:09:15 +08:00
boojack 26be2a9663 feat(navigation): unify creator and space browsing scopes (#6378) 2026-09-26 11:36:31 +08:00
johnnyjoygh 5a65350400 fix(sidebar): flatten account footer surface 2026-09-02 20:45:43 +08:00
johnnyjoygh 191ec01d11 fix(sidebar): unify layout rails and spacing
Keep the primary navigator compact and horizontal while aligning header, content, and footer controls on shared artwork and label rails. Add regression coverage for symmetric popovers, compact hit targets, and mobile drawer accessibility.
2026-09-01 23:24:50 +08:00
amblued 22a5f3385b fix(ui): refine space labels and sidebar menus
Keep long Space titles readable without expanding compact surfaces.

Fold Inbox into the user menu and align sidebar popups with the rail.
2026-08-28 01:01:01 +08:00
amblued 040f9ae717 fix(web): make archived independent of space scope 2026-08-26 23:43:05 +08:00
Johnny f75d49f9b6 fix(web): restore sidebar and outline behavior (#6161) 2026-08-08 08:58:07 +08:00
johnnyjoygh ec689c3a03 chore(sidebar): replace static mode with a library-content fallback
The rail had two navigation grammars for the same destinations: a
compact icon strip on recognized routes, and StaticNavigation — full
labeled rows — on everything else (/about, /403, /404, wildcard).
Crossing onto one of those pages rearranged the entire rail, and any
route nobody remembered to classify silently inherited the alternate
layout.

Make the frame invariant instead: header, global strip, contextual
content, footer — on every route. Pages without a specific sidebar
tenant now fall back to the default library content (the home
collection for signed-in users, explore for guests), following the
convention that error and utility pages render inside the persistent
shell rather than degrading it. The memo-detail route gets the same
fallback while the page has not yet published its descriptor, instead
of a blank scroll area.

Off the collection routes the library is display-plus-navigation, so
StatisticsView and TagsSection accept a navigationTarget: calendar and
tag clicks land on / or /explore with the filter in the query string,
which RootLayout's route-change effect would otherwise wipe.

StaticNavigation is deleted, About returns to living only in the user
menu (the showAbout prop is gone), and the guest strip now marks About
active on /about.
2026-08-07 00:04:04 +08:00
johnnyjoygh d14a542002 chore(web): add static navigation for default routes
- Show auth-aware common destinations when a route has no contextual sidebar.
- Restore About as a standalone page and route all About entries to it.
2026-08-05 21:46:34 +08:00
Johnny 4d2667983f feat(web): unify navigation in a route-aware sidebar (#6144) 2026-08-05 09:05:57 +08:00
boojack 9c3bd44a1b chore(web): migrate UI primitives to Base UI 2026-07-14 09:06:40 +08:00
boojack 1052c04d33 fix(web): improve mobile control spacing 2026-06-09 21:04:47 +08:00
boojack 418398587c feat(i18n): add searchable locale picker 2026-06-09 09:33:17 +08:00
boojack 411ba7b34c feat(about): add about page with bird sprites 2026-05-14 20:30:37 +08:00
memoclaw e0334cf0a8 refactor: restructure i18n locale keys for better maintainability (#5744)
Co-authored-by: memoclaw <265580040+memoclaw@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-20 05:56:56 +08:00
Steven 0cf8805184 refactor(sse): move status indicator to avatar badge
Replace the standalone SSE dot above UserMenu with a small badge
overlaid on the bottom-right of the user avatar. Only visible when
status is connecting (yellow) or disconnected (red) — invisible in the
normal connected state, removing constant visual noise.
2026-03-03 23:25:01 +08:00
Johnny 61e94e8b08 refactor: replace i18n language change with loadLocale 2025-12-30 21:07:56 +08:00
Johnny d711d724bb chore: clean up unused imports and parameters across components 2025-12-27 10:18:38 +08:00
Johnny f87f728b0f feat: react query migration (#5379) 2025-12-24 22:59:18 +08:00
Johnny 6b0f90f355 chore: prevent sensitive data caching 2025-12-20 12:33:16 +08:00
Johnny 7932f6d0d0 refactor: user auth improvements (#5360) 2025-12-18 18:15:51 +08:00
Steven 87b8c2b2d2 refactor(web): rename grpcweb.ts to connect.ts and enable binary format
- Rename grpcweb.ts to connect.ts to reflect ConnectRPC usage
- Enable binary protobuf format for improved performance
- Update all imports across 26 files from @/grpcweb to @/connect

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 20:15:16 +08:00
Steven 81da20c905 refactor: simplify theme/locale to user preferences and improve initialization
Remove theme and locale from instance settings to eliminate duplication and
simplify the codebase. These are user-specific preferences and should only
exist in user settings, not instance-wide settings.

Backend changes:
- Remove theme from InstanceGeneralSetting proto
- Remove locale from InstanceCustomProfile proto
- Update instance service converters to remove theme/locale handling
- Simplify RSS feed to use static locale

Frontend changes:
- Remove theme/locale from instanceStore state
- Create unified initialization flow with clear fallback priority:
  * Theme: user setting → localStorage → system preference
  * Locale: user setting → browser language
- Add applyUserPreferences() to centralize theme/locale application
- Simplify App.tsx by removing redundant state synchronization
- Update all components to use new helper functions:
  * getThemeWithFallback() for theme resolution
  * getLocaleWithFallback() for locale resolution
- Remove theme/locale selectors from instance profile dialog

Theme utilities refactor:
- Organize code into clear sections with JSDoc comments
- Extract localStorage operations into getStoredTheme/setStoredTheme helpers
- Split DOM manipulation into focused functions
- Improve type safety with Theme and ResolvedTheme types
- Reduce code duplication and improve maintainability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 09:08:46 +08:00
Steven 156908c77f chore(web): migrate from ESLint+Prettier to Biome
- Install @biomejs/biome@2.3.5 as unified linter and formatter
- Remove ESLint, Prettier and all related plugins (221 packages removed)
- Migrate linting rules from ESLint to Biome configuration
- Migrate formatting rules from Prettier to Biome configuration
- Exclude auto-generated proto files from linting (src/types/proto/**)
- Exclude CSS files from Biome (Tailwind syntax not yet supported)
- Update package.json scripts:
  - lint: tsc + biome check
  - lint:fix: biome check --write
  - format: biome format --write
- Auto-fix import organization across 60+ files
- Fix duplicate key in Russian locale (ru.json)
- Update CLAUDE.md documentation to reflect Biome usage

Benefits:
- 10-100x faster linting performance
- Simplified toolchain with single configuration file
- 221 fewer npm dependencies
- Unified linting, formatting, and import organization
2025-11-14 23:58:07 +08:00
Steven 4c1d1c70d1 refactor: rename workspace to instance throughout codebase
Remove work-related terminology by renaming "workspace" to "instance"
across the entire application. This change better reflects that Memos
is a self-hosted tool suitable for personal and non-work use cases.

Breaking Changes:
- API endpoints: /api/v1/workspace/* → /api/v1/instance/*
- gRPC service: WorkspaceService → InstanceService
- Proto types: WorkspaceSetting → InstanceSetting
- Frontend translation keys: workspace-section → instance-section

Backend Changes:
- Renamed proto definitions and regenerated code
- Updated all store layer methods and database drivers
- Renamed service implementations and API handlers
- Updated cache from workspaceSettingCache to instanceSettingCache

Frontend Changes:
- Renamed service client: workspaceServiceClient → instanceServiceClient
- Updated all React components and state management
- Refactored stores: workspace.ts → instance.ts
- Updated all 32 locale translation files

All tests pass and both backend and frontend build successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 23:35:35 +08:00
Steven bc1550e926 refactor(api): migrate inbox functionality to user notifications
- Remove standalone InboxService and move functionality to UserService
- Rename inbox to user notifications for better API consistency
- Add ListUserNotifications, UpdateUserNotification, DeleteUserNotification methods
- Update frontend components to use new notification endpoints
- Update store layer to support new notification model

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 08:33:09 +08:00
Steven 243ecf14b0 refactor(api): remove DeleteMemoTag and RenameMemoTag endpoints
BREAKING CHANGE: Removed DeleteMemoTag and RenameMemoTag API endpoints
for better API consistency. Tags should now be managed by updating memo
content directly via UpdateMemo endpoint.

Backend changes:
- Remove RenameMemoTag and DeleteMemoTag RPC methods from proto
- Remove backend implementations in memo_service.go
- Regenerate protocol buffers (Go, TypeScript, OpenAPI)

Frontend changes:
- Remove RenameTagDialog component
- Simplify TagsSection to remove rename/delete functionality
- Improve tag styling with active state highlighting
- Add smooth transitions and better hover interactions
- Polish TagTree component for consistency
- Tags now only support click-to-filter (no inline editing)

Style improvements:
- Active tags highlighted with primary color and font-medium
- Consistent hover states across flat and tree views
- Better spacing and visual hierarchy
- Improved empty state styling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 23:32:47 +08:00
Steven 2371bbb1b7 feat(web): add quick language and theme switchers to user menu
- Add language and theme selector submenus to UserMenu component for quick access
- Refactor shared utilities: extract THEME_OPTIONS constant and getLocaleDisplayName() function
- Update LocaleSelect and ThemeSelect to use shared utilities, eliminating code duplication
- Make UserMenu reactive with MobX observer for real-time setting updates
- Fix language switching reactivity by immediately updating workspaceStore.state.locale
- Add scrollable menu support for language selector (max-h-[90vh])
- Apply same instant locale update to PreferencesSection for consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 22:32:25 +08:00
Copilot 3245613a88 chore: cleanup components naming 2025-10-12 18:58:37 +08:00