Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: doc update time outdated #7434

Merged
merged 1 commit into from
Jun 26, 2024
Merged

fix: doc update time outdated #7434

merged 1 commit into from
Jun 26, 2024

Conversation

akumatus
Copy link
Member

@akumatus akumatus commented Jun 26, 2024

Fix issue BS-603.

  • get updatedDate directly from doc meta data.
  • Add observer for docMetaUpdated slot, thus the updated time on embed card can be refresh automatically.
  • Use toLocaleString to show updated date.

toeverything/AFFiNE#7344

2024-06-26.19.10.30.mov

Copy link

vercel bot commented Jun 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2024 3:47pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Jun 26, 2024 3:47pm

Copy link

graphite-app bot commented Jun 26, 2024

Your org has enabled the Graphite merge queue for merging into master

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @akumatus and the rest of your teammates on Graphite Graphite

@@ -11,6 +11,7 @@ export interface DocMeta {
title: string;
tags: string[];
createDate: number;
updatedDate?: number;
Copy link
Contributor

@L-Sun L-Sun Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@doodlewind @Saul-Mirone Please take a look. This field exists on the AFFiNE side

akumatus added a commit to toeverything/AFFiNE that referenced this pull request Jun 26, 2024
Fix issue [BS-603](https://linear.app/affine-design/issue/BS-603).

- Move observe `blockUpdated` logic in `blocksuite-editor` component, so it can be excuted on both page-detail and center-peek mode.
- Remove useless `getDocUpdatedAt` service, because blocksuite can get `docMeta` directly.

toeverything/blocksuite#7434

https://github.com/toeverything/AFFiNE/assets/12724894/e01e3f97-f1d0-4d1d-a8ed-e70e27e39bdb
Copy link

graphite-app bot commented Jun 26, 2024

Merge activity

Fix issue [BS-603](https://linear.app/affine-design/issue/BS-603).

- get `updatedDate` from doc meta data.
- Add observer for `docMetaUpdated` slot, thus the updated time on embed card can be refresh automatically.
- Use `toLocaleString` to show updated date.

toeverything/AFFiNE#7344

https://github.com/toeverything/blocksuite/assets/12724894/eebf9a71-1961-4b81-8afd-f60c12420b13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants