Commit Graph

194 Commits

Author SHA1 Message Date
JimmFly
4916eea24f
feat(core): new share menu (#7838)
close AF-1224 AF-1216

![image](https://github.com/user-attachments/assets/204c408a-3dab-4068-86f6-e20abcfa863c)
2024-08-19 05:51:05 +00:00
JimmFly
9037e6695e
feat(core): add configuration for experimental features (#7699)
close AF-1218 AF-1219

Added configuration for experimental features

Example:
```
const blocksuiteFeatureFlags = {
  ...
  enable_expand_database_block: {
    displayName: 'Enable Expand Database Block',
    description: 'Allows expanding database blocks for better view and management.',
    feedbackType: 'discord',
    displayChannel: ['stable', 'beta', 'canary', 'internal'],
    restrictedPlatform: 'client'
  },
    enable_ai_onboarding: {
    displayName: 'AI Onboarding',
    description: 'Enables AI onboarding.',
    displayChannel: [],
    defaultState: true,
  },
  ...
}

```

![CleanShot 2024-08-02 at 12 26 36@2x](https://github.com/user-attachments/assets/98b1e8e7-cd8b-4309-8063-323b2f3b5a94)
2024-08-13 02:26:05 +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
hwangdev97
4ac9bd7790
feat(i18n): fix i18n en-Us & en json english style (#7834) 2024-08-12 03:19:13 +00:00
forehalo
eef9afd3ed
chore: bump base version to 0.16.0 2024-08-09 18:30:07 +08:00
EYHN
b2c00a2618
fix(core): typo in migration text (#7804) 2024-08-09 05:23:52 +00:00
JimmFly
85637156f6
chore: adjust i18n (#7800) 2024-08-09 04:10:18 +00:00
EYHN
7efc87b6d3
chore(core): adjust migration text (#7802) 2024-08-09 11:50:52 +08:00
Tasnim Tantawi
450106ea54
feat(i18n): add Arabic (#7795) 2024-08-09 10:08:52 +08:00
JimmFly
4e03edba44
feat(i18n): add Spanish(Argentina) and Urdu (#7771)
Support for various languages has been updated, and `Spanish (Argentina)` and `Urdu` have been added. Many thanks to the community contributors for their ongoing translation efforts.
2024-08-07 08:57:23 +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
L-Sun
bd31c8388c
fix(core): update outline viewer style (#7641)
## What changes
- Update responsive style and fix some bug of outline viewer (https://github.com/toeverything/blocksuite/pull/7759)
- Change left and right padding of full-width editor from `15px` to `72px`
- Hide outline viewer when side outline panel is opened ([BS-987](https://linear.app/affine-design/issue/BS-987/逻辑-bug-toc-入口和-toc-侧边栏共存))
- Add entries of outline panel and frame panel in more menu of detail page header ( [BS-996](https://linear.app/affine-design/issue/BS-996/page-mode-下的-page-option-缺少-view-table-of-contents-的入口) , [BS-1006](https://linear.app/affine-design/issue/BS-1006/edgeless-mode-的-page-options-里缺少-view-all-frames))
- Add outline viewer to dock peek preview ( [BS-995](https://linear.app/affine-design/issue/BS-995/center-peek-里缺少-quick-toc-的入口) )
- Add more e2e tests for outline viewer
2024-08-05 03:57:48 +00:00
pengx17
9307acf0de
fix(core): ctrl/cmd + click on add page button opens in new tab (#7701)
fix PD-1521
2024-08-05 03:11:47 +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
L-Sun
33fc00f8c7
chore(core): set read-only mode on mobile device (#7651)
Close [BS-795](https://linear.app/affine-design/issue/BS-795/affine-mobile-设置只读模式)

- Set read-only mode on mobile device
- Add mobile only support read-only warning toast
- remove `user-select: none` so that user can select text in read-only mode
2024-08-01 05:22:50 +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
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
EYHN
3eb09cde5e
feat(core): new favorite (#7590) 2024-07-26 08:15:32 +00:00
Cats Juice
c63d007571
feat(core): add doc/collection/tag select hook (#7593) 2024-07-26 15:44:56 +08:00
EYHN
54da85ec62
feat(core): init organize (#7456) 2024-07-26 04:35:32 +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
Cats Juice
d7cc546f58
fix(core): correct believer plan copy (#7571) 2024-07-23 10:11:07 +08:00
CatsJuice
4f718cffbf
feat(core): subscribe changed notification and typeform link (#7522) 2024-07-18 04:20:21 +00:00
renovate
2919d4912c
chore: bump up react-i18next version to v15 (#7529)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [react-i18next](https://togithub.com/i18next/react-i18next) | [`^14.1.0` -> `^15.0.0`](https://renovatebot.com/diffs/npm/react-i18next/14.1.3/15.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-i18next/15.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-i18next/15.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-i18next/14.1.3/15.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-i18next/14.1.3/15.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>i18next/react-i18next (react-i18next)</summary>

### [`v15.0.0`](https://togithub.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1500)

[Compare Source](https://togithub.com/i18next/react-i18next/compare/v14.1.3...v15.0.0)

-   use optional chaining, nullish coalescing and nullish coalescing assignment [1774](https://togithub.com/i18next/react-i18next/pull/1774)
-   Build config and optimizations [1769](https://togithub.com/i18next/react-i18next/pull/1769)
-   some dependency updates [1768](https://togithub.com/i18next/react-i18next/pull/1768)
-   use modern hasLoadedNamespace code (now requires at least i18next > v19.4.5 (introduced in june 2020))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
2024-07-18 03:09:34 +00:00
CatsJuice
08a0572d4e
fix(core): update pricing pages (#7521) 2024-07-17 08:01:13 +00:00
forehalo
2f441d9335
chore: clean up runtime flags and envs (#7454) 2024-07-11 02:05:31 +00:00
JimmFly
e6818b4f14
feat(core): add doc info modal (#7409)
close AF-1038
close AF-1039
close AF-1040
close AF-1046

A popup window has been added to facilitate viewing of this doc's info in edgeless mode and other modes.

https://github.com/toeverything/AFFiNE/assets/102217452/d7f94cb6-7e32-4ce7-8ff4-8aba1309b331
2024-07-09 07:05:20 +00: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
forehalo
de91027852
feat(server): support lifetime subscription (#7405)
closes CLOUD-48

- [x] lifetime subscription quota
- [ ] tests
2024-07-08 07:41:26 +00:00
pengx17
5c1f78afd4
fix: invalid date handling (#7422)
fix AF-1049
2024-07-04 07:11:19 +00:00
EYHN
27d0fc5108
refactor(core): use new backlink indexer (#7296) 2024-07-02 09:18:01 +00:00
EYHN
40e381e272
refactor(core): new quick search service (#7214) 2024-07-02 09:17:54 +00:00
EYHN
eca484dc28
fix(core): add loading for insert ai template (#7369) 2024-06-28 14:19:59 +08:00
forehalo
ae230354c6
chore: bump base version to 0.15.0 2024-06-27 18:17:36 +08:00
CatsJuice
f24c0caaea
feat(core): add ai-usage info in sidebar user avatar menu (#7294) 2024-06-21 02:47:20 +00:00
EYHN
7c0a686cd9
refactor(i18n): new hook api (#7273)
# NEW HOOK API

`useI18n`: same as `useAFFiNEI18N`, with additional APIs

```ts
import { useI18n } from '@affine/i18n'

const i18n = useI18n()
i18n['hello world']() -> 你好世界
```

# NEW GLOBAL i18n Instance

`I18n`: use i18n capabilities outside of React

```ts
import { I18n } from '@affine/i18n'

I18n['hello world']() -> 你好世界
```

# NEW TYPES

`I18nKeys` -> all i18n keys

`I18nString` -> An i18n message (key&options)
transfer and store i18n text outside of React
```ts
const msg: I18nString = {
  key: 'helloworld',
  options: {
    arg1: '123'
  }
}

I18n.t(msg) -> 你好世界123
```

before:

```ts
registerCommand('open-page', {
  name: t('command.open-page')
  // ^- translation happens here,
})
```

after:

```ts
registerCommand('open-page', {
  name: { key: 'command.open-page' }
  // ^- store I18nString here, translate when the command render to UI
})
```
2024-06-20 02:19:41 +00:00
EYHN
bcc66422fd
refactor(i18n): i18n utils tools (#7251) 2024-06-19 07:38:20 +00:00
JimmFly
6c3e13316e
feat(i18n): update resources and add Swedish language (#7247)
close AFF-1279
2024-06-19 02:47:05 +00:00
EYHN
98258b0211
feat(core): show sync state at doc info (#7244) 2024-06-18 08:35:22 +00:00
pengx17
3464e30229
fix: quick search placeholder for docs search (#7175)
fix AFF-1236
2024-06-07 07:42:16 +00:00
pengx17
e6ec506226
fix: insert link action in quick search callback (#7165) 2024-06-07 04:39:20 +00:00
pengx17
1439d00b61
feat: add search doc modal (#7136) 2024-06-06 06:29:36 +00:00
pengx17
ea0059fa1b
feat: center peek view (#7073)
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/T2klNLEk0wxLh4NRDzhk/7380c06e-880e-424a-9204-8cfb5e924978.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/T2klNLEk0wxLh4NRDzhk/7380c06e-880e-424a-9204-8cfb5e924978.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/7380c06e-880e-424a-9204-8cfb5e924978.mp4">Kapture 2024-05-30 at 19.42.46.mp4</video>
2024-05-31 10:28:37 +00:00
JimmFly
609766d898
refactor(core): replace history to ViewService.history (#6972)
upstream: #6966
2024-05-22 04:01:33 +00:00
JimmFly
10015c59b7
feat(core): add private anchor link for sharing (#6966)
close AFF-1085
2024-05-16 13:35:02 +00:00
JimmFly
1b91ffa6a5
chore: adjust quick search style (#6906)
close TOV-854
<img width="651" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/f281eb82-852c-411d-b3dd-4bf7d7ce74e8">
2024-05-14 07:28:25 +00:00
akumatus
261d413607
feat: history timeline shows relative time, such as today and yesterday (#6864)
### TL;DR
First, fixed an i18n issue in history panel. When the browser language is set to Chinese, and the AFFiNE application language is set to English, the language supposed to be English global. But now the language is a mixture of Chinese and English, which is obviously wrong.

![截屏2024-05-08 18.23.21.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/93d8218a-3b26-4b0c-9f15-71a8996556db.png)

Second, design a time formatter to convert timestamp into relative calendar date, such today and yesterday and so on. Long-ago edits will show the exact date like before.

![截屏2024-05-10 15.30.57.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/sJGviKxfE3Ap685cl5bj/dbc59e80-9504-40b1-b712-5c155cb6fa63.png)

### What changed?
- `new Intl.DateTimeFormat` with language option form  `document.documentElement.lang`
- Added `timestampToCalendarDate` function to convert timestamp into relative calendar date
- Updated unit tests
- Updated i18n copywriting

### How to test?
1. Open view history version
2. Check edit timeline
2024-05-13 11:59:48 +00:00
pengx17
3e23878e0f
feat: add more tracking events (#6866)
Added most tracking events

what is missing:
- still need a way to track events in blocksuite
- some events may not 100% accurate of the one defined in the PRD
2024-05-13 03:36:32 +00:00
JimmFly
291db7d809
feat(core): add untagged group to GroupBy view (#6837)
close #6688

<img width="743" alt="image" src="https://github.com/toeverything/AFFiNE/assets/102217452/9ffe3cac-0c73-4a8c-8567-8a315eed6548">
2024-05-09 02:30:52 +00:00