Commit Graph
100 Commits
Author SHA1 Message Date
Cats Juice 23b0db36b9 feat(component): mobile menu support (#7892) 2024-08-21 09:05:05 +00:00
CatsJuice a43c34feec fix(core): onboarding switch active state is invisible (#7928)
close AF-1262
2024-08-21 06:17:31 +00:00
CatsJuice c9a1a8c3b2 feat(component): access enviroment in components storybook (#7891)
close AF-1247
2024-08-21 06:04:39 +00:00
CatsJuice a49b92e4c8 feat(core): adjust sidebar style, add github & learn more (#7864)
close AF-1202
2024-08-21 05:48:04 +00:00
CatsJuice cfc367efe7 feat(component): add more customizable prop for radio-group with new story (#7850)
![CleanShot 2024-08-13 at 16.40.22@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/06a128c3-f0bb-47f9-babf-6d4eca2597d7.png)
2024-08-16 07:19:16 +00:00
CatsJuice 6228b27271 feat(core): new theme editor poc (#7810) 2024-08-12 04:12:51 +00:00
CatsJuice 75e02bb088 feat(core): rewrite page-mode-switch with RadioGroup, bind hotkey with cmdk (#7758)
close AF-1170

- bump `@toeverything/theme`
- refactor page-mode-switch
  - use global `<RadioGroup />`
  - reuse for doc history
  - remove `styled` usage
  - bind hotkey via cmdk
- Update `<RadioGroup />` color scheme with latest design system
- Update right sidebar header tab style
- Update tooltip with shortcut for app nav button
2024-08-12 03:56:56 +00:00
Cats Juice 06d5d9719c fix(core): wrong color of ai-subscribe button (#7816) 2024-08-09 09:44:09 +00:00
Cats Juice f8e51112aa fix(core): sidebar renaming menu pos (#7798) 2024-08-09 17:06:55 +08:00
Cats Juice e8d5692062 fix(core): sidebar unauthorized user avatar should center vertically (#7812) 2024-08-09 16:52:29 +08:00
CatsJuice 26fd9a4a1c feat(component): add autoFocusConfirmButton for confirm-modal (#7801)
close #5813

<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/LakojjjzZNf6ogjOVwKE/aff35b76-9f73-4d15-b2cb-c25b03e2e2c3.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/LakojjjzZNf6ogjOVwKE/aff35b76-9f73-4d15-b2cb-c25b03e2e2c3.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/aff35b76-9f73-4d15-b2cb-c25b03e2e2c3.mp4">CleanShot 2024-08-09 at 11.25.46.mp4</video>
2024-08-09 05:50:22 +00:00
CatsJuice 03fd23de39 fix(core): cloud s subscription resume button's content is blank (#7783) 2024-08-08 08:43:05 +00:00
CatsJuice c8f4766ceb fix(component): center button's icon vertically (#7775)
close AF-1211
2024-08-07 09:31:23 +00:00
CatsJuice 75a308ac79 fix(core): optimize explorer's dnd behaviors (#7769)
close AF-1198, AF-1169, AF-1204, AF-1167, AF-1168

- **fix**: empty favorite cannot be dropped(AF-1198)
- **fix**: folder close animation has a unexpected delay
- **fix**: mount explorer's DropEffect to body to avoid clipping(AF-1169)
- **feat**: drop on empty organize to create folder and put item into it(AF-1204)
- **feat**: only show explorer section's action when hovered(AF-1168)
- **feat**: animate folder icon when opened(AF-1167)
- **chore**: extract dnd related `dropEffect`, `canDrop` functions outside component
2024-08-07 08:29:19 +00:00
CatsJuice 5938d8b259 feat(core): add tooltip and toast for organize operations (#7725)
close AF-1138, AF-1139, AF-1165
2024-08-06 02:07:10 +00:00
CatsJuice 6d253c0600 fix(core): add favorite folder in menu, adjust empty-page new page button (#7730)
close AF-1150, AF-1128, AF-1131
- Replace favorite migration related copy
- Adjust empty page's "New Page" button
  ![CleanShot 2024-08-05 at 15.16.06@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/1cf7d75a-a33a-4eec-9dc1-87d50d9526f1.png)
- Add toggle favorite to folder menu
  ![CleanShot 2024-08-05 at 15.17.50@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/af6116b5-47d1-49a6-9660-41c0d7cd8fd3.png)
- Adjust `Button`
  - add `withoutHover` state
  - remove cursor: not-allowed when disabled
2024-08-05 09:15:17 +00:00
CatsJuice 249f3471c9 feat(component): shortcut style for tooltip (#7721)
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/2e68337c-91f1-4ea7-8426-7fb33be02081.png)

- New `shortcut` prop for `<Tooltip />`
  - single key
      ```tsx
      <Tooltip shortcut="T" />
      ```
  - multiple
      ```tsx
      <Tooltip shortcut={["⌘",  "K"]} />
      ```
- Round tooltip's arrow
- Use new design system colors
- Replace some usage
  - App sidebar switch
  - Editor mode switch
  - New tab (new)
2024-08-05 02:57:24 +00:00
CatsJuice 3d855647c7 refactor(component): refactor the implementation of Button and IconButton (#7716)
## Button
- Remove props withoutHoverStyle
   refactor hover impl with independent layer, so that hover-color won't affect the background even if is overridden outside
- Update `type` (renamed to `variant`):
  - remove `processing` and `warning`
  - rename `default` with `secondary`
- Remove `shape` props
- Remove `icon` and `iconPosition`, replaced with `prefix: ReactNode` and `suffix: ReactNode`
- Integrate tooltip for more convenient usage
- New Storybook document
- Focus style

## IconButton
- A Wrapper base on `<Button />`
- Override Button size and variant
  - size: `'12' | '14' | '16' | '20' | '24' | number`
     These presets size are referenced from the design system.
  - variant:  `'plain' | 'solid' | 'danger' | 'custom'`
- Inset icon via Button 's prefix

## Fix
- fix some button related issues
- close AF-1159, AF-1160, AF-1161, AF-1162, AF-1163, AF-1158, AF-1157

## Storybook

![CleanShot 2024-08-03 at 14.57.20@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/f5a76110-35d0-4082-a940-efc12bed87b0.png)
2024-08-05 02:57:23 +00:00
CatsJuice e60b2d64e5 fix(core): new no children status for explorer (#7686)
close AF-1140
2024-08-01 09:41:13 +00:00
CatsJuice 8816d2a639 feat(core): adjust explorer section style, persist collapsable state (#7679)
close AF-1124,AF-1129,AF-1134,AF-1144
2024-08-01 09:41:09 +00:00
CatsJuice ede576061d fix(core): adjust sidebar explorer empty status (#7657)
Close AF-1126,AF-1132
2024-07-31 02:41:53 +00:00
CatsJuice 083123cdfb fix(component): adjust renaming style (#7654) 2024-07-31 02:26:34 +00:00
CatsJuice 12a2f929f8 fix(component): stop renaming modal propagation & input auto focus (#7653)
close AF-1125
2024-07-31 02:26:30 +00:00
CatsJuice c1b26473a9 chore(core): update sidebar all-docs icon (#7626)
close AF-1079
2024-07-31 02:13:02 +00:00
CatsJuice 5c62a2b2f5 feat(core): add doc/tag/collection to folders via menu (#7631)
close AF-993,AF-995,AF-997,AF-998
2024-07-29 07:30:20 +00:00
CatsJuice b9c0119d2c fix(core): adjust believer card dark mode style (#7623) 2024-07-29 07:15:17 +00:00
CatsJuice 214f5fa94d fix(core): sidebar node content should ellipsis when overflowed (#7627) 2024-07-29 06:59:16 +00:00
Cats Juice c63d007571 feat(core): add doc/collection/tag select hook (#7593) 2024-07-26 15:44:56 +08:00
CatsJuice cb0d91facd feat(core): support lifetime subscription from external link (#7585)
close AF-1101
2024-07-26 03:49:17 +00:00
CatsJuice 0617061c5b fix(core): do not clip center-peek controls to make it appear more quickly (#7572)
fix AF-1084

![CleanShot 2024-07-23 at 11.11.03.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/91d593b6-c400-4602-9eab-abb9c0b0f63b.gif)
2024-07-26 03:35:00 +00:00
CatsJuice 8646221ee8 feat(infra): add ability to mount nodes to nearest FrameworkScope root (#7551)
![CleanShot 2024-07-19 at 12.52.08.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/dc5b8dc6-b7b2-4db2-83d5-7601c3f966d8.gif)
2024-07-26 03:19:27 +00:00
CatsJuice 22c36102b9 feat(core): move sidebar new page button beside quick-search (#7578)
close AF-1078
2024-07-26 03:04:10 +00:00
CatsJuice a714961b20 feat(core): adjust subscription related mixpanel (#7536) 2024-07-26 02:49:15 +00:00
CatsJuice 11a2dc7d7f feat(core): bump theme (#7587)
close AF-1108
2024-07-25 08:00:55 +00:00
CatsJuice b1380ce81f feat(core): adjust left-sidebar min-width to 248px (#7575)
close AF-1094
2024-07-24 02:43:25 +00:00
CatsJuice 091f5eec01 fix(core): remove hover state for ai-usage block in sidebar avtar menu (#7573)
fix AF-1059
2024-07-24 02:27:04 +00:00
CatsJuice b0ad36425d fix(core): beliver plan should not show cancel subscription (#7576)
fix AF-1097
2024-07-23 10:54:22 +00:00
Cats Juice d7cc546f58 fix(core): correct believer plan copy (#7571) 2024-07-23 10:11:07 +08:00
CatsJuice 239de4c283 feat(core): reuse select-page for edit collection pages-mode (#7548) 2024-07-19 04:47:48 +00:00
CatsJuice 4f718cffbf feat(core): subscribe changed notification and typeform link (#7522) 2024-07-18 04:20:21 +00:00
CatsJuice b9d84fe007 fix(core): select page modal's list is not visiable (#7531)
fix AF-1076

![CleanShot 2024-07-18 at 10.18.41.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/9bff1f9e-f752-4cb2-87ad-0da62d69effa.gif)
2024-07-18 04:06:02 +00:00
Cats Juice ade8db2aec fix(core): adjust app-sidebar z-index (#7523) 2024-07-17 18:10:08 +08:00
Cats Juice 07d4c476c2 fix(core): right-sidebar header radio-group's indicator is missing (#7524) 2024-07-17 18:09:48 +08:00
Cats Juice db3533724b fix(core): resolve unexpected forwardRef warning (#7527) 2024-07-17 18:08:59 +08:00
CatsJuice 08a0572d4e fix(core): update pricing pages (#7521) 2024-07-17 08:01:13 +00:00
CatsJuice 242c41b440 feat(core): adjust center peek animation (#7393) 2024-07-15 06:36:24 +00:00
CatsJuice 7082f7ea7a fix(core): share-button's label of shared page should be 'shared' (#7486)
close #7427
2024-07-15 06:21:22 +00:00
CatsJuice c850dbb2b7 refactor(core): optimize abstraction of sidebar doc tree structure (#7455) 2024-07-11 06:24:45 +00:00
Cats Juice 22187f964a fix(core): impl ai-island animation via css transform (#7458) 2024-07-09 16:17:55 +08:00
CatsJuice 13a2562282 feat(core): believer subscription UI (#7431)
feat(core): switch ai and cloud plans position

feat(core): impl lifetime subscription ui

feat(core): adapt ui for lifetime status

feat(core): add believer card in billing page
2024-07-08 08:31:22 +00:00
CatsJuice d6ad7d566f chore(core): adjust ai onboarding dismiss logic, persist dialog and dismiss once closed (#7417) 2024-07-04 07:00:17 +00:00
Cats Juice fa2305b0e2 feat(core): replace all radio-button-group usage (#7352) 2024-06-27 17:54:30 +08:00
CatsJuice 827c952e9f refactor(component): new Radio component (#6910)
# New `RadioGroup` component to replace `RadioButton`

![CleanShot 2024-06-25 at 17.18.02.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/77241b07-a2dd-4d27-a322-3056f483f75a.gif)

### what's new
- [x] Change the API
- [x] More customizable options
- [x] Indicator animation
- [x] Dynamic width support(responsive)
- [x] Storybook
- [x] JSDoc
2024-06-27 06:04:19 +00:00
CatsJuice b38c46649f feat(core): adjust ai help island style and behavior, add animation (#7310)
- Move right-sidebar activeTab state into `RightSidebarService`
- Remove `styled` usage and adjust the UI
- Fix the issue that ai-button clicking not work when sidebar opened
- Add an animation if AI-Chat panel hasn't been opened.

![CleanShot 2024-06-24 at 18.10.27.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/14c86fbc-ad4c-44bf-93fe-ca3450db908b.gif)
2024-06-24 14:37:38 +00:00
CatsJuice f24c0caaea feat(core): add ai-usage info in sidebar user avatar menu (#7294) 2024-06-21 02:47:20 +00:00
CatsJuice 1fdfa834a0 feat(core): responsive detail page header (#7263) 2024-06-20 05:47:43 +00:00
CatsJuice f9903fd748 fix(core): can't enter presentation again in share page (#7262)
Fix [TOV-916](https://linear.app/affine-design/issue/TOV-916/分享页面的-present-按钮在第二次进入演示模式时未生效)
2024-06-19 09:21:23 +00:00
CatsJuice 98e35384a6 feat(component): helper function observeResize to observe size change via global ResizeObserver (#7241)
```ts
import { observeResize } from "@affine/component";

useEffect(() => {
  const dispose = observeResize(element entry => {
    console.log(entry.contentRect);
  });

  return () => dispose();
}, []);
```
2024-06-19 09:04:56 +00:00
CatsJuice f4fdbbe6dd feat(core): expose toggle ai onboarding apis (#7039)
```ts
import { toggleGeneralAIOnboarding } from '@affine/core/components/affine/ai-onboarding/apis';

// show
// toggleGeneralAIOnboarding();
toggleGeneralAIOnboarding(true);

// dismiss
toggleGeneralAIOnboarding(false);
```
2024-05-28 05:27:24 +00:00
CatsJuice d066da3e8a fix(core): right sidebar's content is not centered when clientBorder enabled (#7034)
- before
    ![CleanShot%202024-05-22%20at%2018.18.15@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/4fe8f114-6471-4e28-8788-0d50b39efe7a.png)
    ![CleanShot%202024-05-22%20at%2018.27.18@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/95ff58d7-2f6b-42ae-85f2-6b026ad48c05.png)

- after
    ![CleanShot 2024-05-22 at 19.10.30@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/920fc348-b53f-4e5e-aa85-3329372923b1.png)
2024-05-23 02:42:01 +00:00
CatsJuice 03104cd8b1 fix(component): ui storybook's doc page can not scroll (#6909) 2024-05-20 01:26:37 +00:00
CatsJuice 46140039d9 fix(core): local onboarding should dismiss after clicking learn more (#6942) 2024-05-16 07:41:49 +00:00
CatsJuice 6cef03c4c3 fix(core): adjust ai onboarding trigger logic, launch by auth status (#6941)
- if signed in, show ai-onboarding dialog
- if not signed in, show ai onboarding toast
2024-05-16 07:41:39 +00:00
CatsJuice 301586c0f4 fix(component): avoid close button of the notification being invisible in dark mode and bright bg (#6946) 2024-05-16 06:43:47 +00:00
CatsJuice 36575ca1b5 chore(core): adjust setting modal's size (#6849) 2024-05-09 07:38:07 +00:00
CatsJuice 9f432a04d4 fix(core): ai plan should show even user not signed in (#6845) 2024-05-09 07:26:27 +00:00
CatsJuice 960b906935 fix(core): avoid shaking when renaming doc in title bar (#6847)
- before
    ![CleanShot 2024-05-09 at 14.42.45.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/5c7b6beb-d24f-49b8-a2c2-f3ab07f4972a.gif)

- after
    ![CleanShot 2024-05-09 at 14.43.57.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/325b68b5-a904-425a-b2c4-5f914237b497.gif)
2024-05-09 07:15:14 +00:00
CatsJuice 301cc188ca fix(core): adjust ai onboarding copywriting and local onboarding actions (#6834) 2024-05-08 09:18:17 +00:00
CatsJuice e7483c7914 fix(core): correct ai related copywritting (#6799) 2024-05-07 07:19:53 +00:00
CatsJuice 7234e2344b feat(core): replace setting content scroll with radix ScrollArea (#6787)
Use global scroll-area style

![CleanShot 2024-05-07 at 10.58.01@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/5330b59d-fea0-4b2b-a046-1740c8099a19.png)
2024-05-07 03:19:40 +00:00
CatsJuice f02a16513c fix(core): adjust setting sidebar's workspace avatar (#6785) 2024-05-07 02:51:33 +00:00
CatsJuice 4a74148ea3 fix(component): ensure the colorfulCallback of Avatar in different sizes behaves consistently (#6784) 2024-05-07 02:40:22 +00:00
CatsJuice 4aa7cafda3 fix(core): ai related copywritting fix (#6766) 2024-05-06 03:57:04 +00:00
CatsJuice 5e8fe28326 chore(core): replace ai onboarding videos (#6730) 2024-04-29 07:07:43 +00:00
CatsJuice 8d342f85ad fix(core): workspace avatar hover radius (#6717) 2024-04-29 02:27:21 +00:00
CatsJuice 5b5c27b6ce feat(core): add ai pricing tip for plans page (#6704) 2024-04-26 03:28:28 +00:00
CatsJuice 2a2b1cea28 feat(core): add indicator for general ai onboarding dialog (#6687) 2024-04-25 02:09:52 +00:00
CatsJuice 59214af3ad fix(core): adjust payment related copywriting (#6655) 2024-04-24 16:05:09 +00:00
CatsJuice 6ec97b27c4 feat(core): open desktop directly in subscription landing page (#6661) 2024-04-22 14:21:58 +00:00
CatsJuice e13024580d feat(core): add ai subscription landing page (#6657) 2024-04-22 09:03:27 +00:00
CatsJuice d7e08215d7 feat(core): show login modal if not logged in when using ai (#6632)
![CleanShot 2024-04-22 at 09.05.42.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/61b35d07-5d5a-4df9-859b-17cf7a9c20cf.gif)
2024-04-22 03:26:01 +00:00
CatsJuice 13e2a3dbae fix(core): remove sidebar user avatar menu item's rightArrow icon (#6633) 2024-04-19 13:47:28 +00:00
CatsJuice 7970d9b8c9 feat(core): add local ai onboarding dialog (#6600) 2024-04-18 15:48:20 +00:00
CatsJuice 9cb6dcd93d feat(core): check user's subscription at ai onboarding stage (#6608) 2024-04-18 11:28:06 +00:00
CatsJuice bb329944ed feat(core): optimize ai onboarding trigger logic (#6579)
- don't open edgeless ai-onboarding dialog until general ai onboarding and setting modal closed
- clip edgeless ai onboarding thumb to avoid "black border"
- correct "try for free"
- replace edgeless ai onboarding lottie resources
2024-04-16 13:18:10 +00:00
CatsJuice c222cf7b96 fix(core): wrong pricing state in billing ai card (#6583) 2024-04-16 13:07:23 +00:00
CatsJuice b93e79c59d feat(core): ai onboarding for edgeless mode (#6556) 2024-04-15 07:25:37 +00:00
CatsJuice 257e946d5d feat(core): add ai onboarding (#6544) 2024-04-15 07:25:31 +00:00
CatsJuice bb1294f425 fix(core): description of cancel is incorrect when cloud subscription is activated (#6530) 2024-04-15 02:54:41 +00:00
CatsJuice 6a535b94c3 feat(core): create and open cloud workspace if not exists after logged in (#6511)
Only execute when `initCloud=true` is specified in the URL search params.
2024-04-12 09:55:45 +00:00
CatsJuice d40052c748 feat(core): add ai usage in account-setting (#6516) 2024-04-12 06:06:11 +00:00
CatsJuice 8a02c81745 feat(core): remove toggle workspace onboarding dialog (#6501) 2024-04-10 09:07:59 +00:00
CatsJuice a0c92b9966 feat(core): i18n for pricing plans (#6499)
feat(core): adjust pricing plans style

feat(core): i18n for pricing plans
2024-04-10 08:09:14 +00:00
CatsJuice 4a93582799 feat(core): ai subscription in billing page (#6476) 2024-04-09 08:54:54 +00:00
CatsJuice 803b17ae78 style(component): remove button's shadow (#6481) 2024-04-09 03:06:28 +00:00
CatsJuice d9504e4eb7 fix(core): avoid flicking when click sidebar user avatar (#6482) 2024-04-09 02:52:51 +00:00
CatsJuice 3e9e2ce93b feat(core): pricing plans ai subscription ui (#6449) 2024-04-03 08:04:30 +00:00
CatsJuice 381be8a982 fix(component): useConfirmModal can't be closed automatically when 'onConfirm' is non-async (#6439) 2024-04-02 08:23:27 +00:00
CatsJuice 9127bfae67 refactor(core): replace all notification relies on jotai (#6417)
- remove all notification that implemented with jotai and replaced with new `notify`
- Add some notify presets:
  - `notify.error`
  - `notify.success`
  - `notify.warning`
2024-04-02 03:19:07 +00:00
CatsJuice a4cd51e503 refactor(component): new notification center implemented with sonner (#6416)
The Notification has been reimplemented using sooner, no longer relies on jotai, and new story has been added.

- Before
  ```ts
  import { pushNotificationAtom } from '@affine/component/notification-center';
  import { useSetAtom } from 'jotai';

  export const Component = () => {
    const pushNotification = useSetAtom(pushNotificationAtom);
    pushNotification({ ... });
  }
  ```

- After
  ```ts
  import { notify } from "@affine/component";

  export const Component = () => {
    notify({ ... });
  }
  ```
2024-04-02 03:18:57 +00:00