-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Notion Update Page Dynamic Fields #15002
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis pull request involves several minor updates across the Notion integration components. The changes primarily focus on version increments and slight description modifications in various files such as Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
components/notion/actions/update-page/update-page.mjs (1)
57-73
: Consider adding error logging in the catch block.The addition of error handling for database property retrieval is a good improvement. However, it would be valuable to log the error for debugging purposes.
try { const { properties } = await this.notion.retrieveDatabase(this.parent); const selectedProperties = pick(properties, this.propertyTypes); return this.buildAdditionalProps({ properties: selectedProperties, meta: this.metaTypes, }); - } catch { + } catch (error) { + console.error('Failed to retrieve database properties:', error); return { properties: { type: "object", label: "Properties", description: "Enter the page properties as a JSON object", }, }; }components/notion/actions/common/base-page-builder.mjs (1)
82-87
: Optimize property access with optional chaining.The property filtering enhancement is good, but we can improve the code readability using optional chaining.
- .filter((property) => this[property] != null - || (this.properties && this.properties[property])) + .filter((property) => this[property] != null + || this.properties?.[property]) .map((property) => ({ type: properties[property]?.type ?? property, label: property, - value: this[property] || this.properties[property], + value: this[property] ?? this.properties?.[property], }));Note: Changed
||
to??
in the value assignment to properly handle falsy values.🧰 Tools
🪛 Biome (1.9.4)
[error] 83-83: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
components/notion/actions/append-block/append-block.mjs
(1 hunks)components/notion/actions/common/base-page-builder.mjs
(1 hunks)components/notion/actions/create-page-from-database/create-page-from-database.mjs
(1 hunks)components/notion/actions/create-page/create-page.mjs
(1 hunks)components/notion/actions/duplicate-page/duplicate-page.mjs
(1 hunks)components/notion/actions/update-page/update-page.mjs
(3 hunks)components/notion/package.json
(1 hunks)
✅ Files skipped from review due to trivial changes (5)
- components/notion/package.json
- components/notion/actions/append-block/append-block.mjs
- components/notion/actions/create-page-from-database/create-page-from-database.mjs
- components/notion/actions/create-page/create-page.mjs
- components/notion/actions/duplicate-page/duplicate-page.mjs
🧰 Additional context used
🪛 Biome (1.9.4)
components/notion/actions/common/base-page-builder.mjs
[error] 83-83: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
🔇 Additional comments (1)
components/notion/actions/update-page/update-page.mjs (1)
9-10
: LGTM! Version bump and documentation update are appropriate.
The version increment and documentation wording changes are consistent with the nature of the updates in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @michelle0927 lgtm! Ready for QA!
Hi @michelle0927, I tested with the new version, but I still see the data not updated. Could you check again? |
/approve |
Resolves #14905
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores