-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Notion search improvement #15916
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 search improvement #15916
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis pull request updates version numbers for multiple Notion component modules across both actions and sources, along with a package.json version bump. Additionally, the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NotionApp
participant SearchService
participant DatabaseService
User->>NotionApp: Request options with query for pageId
NotionApp->>SearchService: Invoke search(query) with filter "page"
SearchService-->>NotionApp: Return page search results
User->>NotionApp: Request options with query for pageIdInDatabase
NotionApp->>DatabaseService: Call queryDatabase(query)
DatabaseService-->>NotionApp: Return database query results
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
Scope: all 2 workspace projects Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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: 0
🧹 Nitpick comments (2)
components/notion/actions/query-database/query-database.mjs (1)
8-9
: Version Increment and Filter Parameter Enhancement.
The action’s version is updated to "0.0.10" and the filter parameter is now defined as a JSON-stringified object, which is parsed withutils.parseStringToJSON()
. To improve robustness, consider implementing error handling for cases where the provided JSON is invalid.components/notion/actions/search/search.mjs (1)
12-16
: Enhanced Search Query ParameterThe introduction of the "title" property—with the label "Query (Title)"—provides a direct way for users to pass search terms. For clarity, consider renaming this property to "query" so that its purpose is immediately evident.
📜 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 (21)
components/notion/actions/append-block/append-block.mjs
(1 hunks)components/notion/actions/create-comment/create-comment.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/query-database/query-database.mjs
(1 hunks)components/notion/actions/retrieve-block/retrieve-block.mjs
(1 hunks)components/notion/actions/retrieve-database-content/retrieve-database-content.mjs
(1 hunks)components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs
(1 hunks)components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs
(1 hunks)components/notion/actions/retrieve-page/retrieve-page.mjs
(1 hunks)components/notion/actions/search/search.mjs
(1 hunks)components/notion/actions/update-page/update-page.mjs
(1 hunks)components/notion/notion.app.mjs
(2 hunks)components/notion/package.json
(1 hunks)components/notion/sources/new-comment-created/new-comment-created.mjs
(1 hunks)components/notion/sources/new-database/new-database.mjs
(1 hunks)components/notion/sources/new-page/new-page.mjs
(1 hunks)components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs
(1 hunks)components/notion/sources/updated-page-id/updated-page-id.mjs
(1 hunks)components/notion/sources/updated-page/updated-page.mjs
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Publish TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
🔇 Additional comments (23)
components/notion/package.json (1)
3-3
: Version Bump Approved.
The package version is updated to "0.4.1", which aligns with the coordinated versioning updates across the Notion modules.components/notion/sources/updated-page/updated-page.mjs (1)
12-12
: Version Number Update.
The module’s version has been updated to "0.1.6", ensuring consistency with other related Notion components.components/notion/sources/new-page/new-page.mjs (1)
11-11
: Version Update Check.
The version has been incremented to "0.0.12", which is consistent with the suite-wide version bumps.components/notion/sources/updated-page-id/updated-page-id.mjs (1)
10-10
: Version Update Consistency.
The version number is updated to "0.0.7", which maintains consistency across the Notion components.components/notion/sources/new-database/new-database.mjs (1)
10-10
: Version Bump Update
The version is updated to"0.0.10"
, which is consistent with the coordinated versioning effort across Notion components. No functionality or logic changes were introduced via this modification.components/notion/sources/new-comment-created/new-comment-created.mjs (1)
8-8
: Version Update
The version change to"0.0.3"
is a straightforward metadata update. This aligns well with the overall release strategy without altering any operation or control flow in this module.components/notion/sources/page-or-subpage-updated/page-or-subpage-updated.mjs (1)
10-10
: Version Bump
Updating the version to"0.0.8"
is a simple metadata revision. The rest of the module (including the search call and event emission logic) remains unchanged.components/notion/actions/retrieve-page/retrieve-page.mjs (1)
7-7
: Consistent Version Update
The version is bumped to"0.0.6"
in line 7. This change is solely for version tracking and does not impact the existing functionality of the retrieve-page action.components/notion/actions/append-block/append-block.mjs (1)
10-10
: Metadata Update: Version Bump
The module’s version is incremented to"0.3.1"
as shown on line 10. This update is purely administrative and does not affect the logic in the append-block action.components/notion/actions/duplicate-page/duplicate-page.mjs (1)
10-10
: Version Bump VerificationThe version update to "0.0.11" is clearly reflected here and is in line with the coordinated updates seen across Notion components.
components/notion/actions/retrieve-block/retrieve-block.mjs (1)
7-7
: Version Bump VerificationThe module’s version has been successfully updated to "0.0.6". Please ensure that any integration tests or downstream dependencies referencing this version are updated accordingly.
components/notion/actions/search/search.mjs (1)
8-8
: Version Bump VerificationThe version change to "0.0.6" is applied correctly and aligns with the overall versioning strategy of the Notion components.
components/notion/actions/retrieve-database-schema/retrieve-database-schema.mjs (1)
7-7
: Version Bump VerificationThe version update to "0.0.7" is consistent with the coordinated version incrementation across the Notion modules.
components/notion/actions/create-page-from-database/create-page-from-database.mjs (1)
10-10
: Version Bump VerificationThe module’s version is now "0.1.17", which aligns with the similar updates made in other parts of the integration.
components/notion/actions/retrieve-page-property-item/retrieve-page-property-item.mjs (1)
7-7
: Version Bump Update in Retrieve Page Property Item Module
The version has been updated from "0.0.5" to "0.0.6". This change follows the overall versioning consistency and does not affect functionality.components/notion/actions/create-comment/create-comment.mjs (1)
8-8
: Version Bump Update in Create Comment Module
The module’s version has been incremented from "0.0.2" to "0.0.3". There are no functional changes beyond this version bump.components/notion/actions/create-page/create-page.mjs (1)
10-10
: Version Bump Update in Create Page Module
The version has been updated from "0.2.14" to "0.2.15". This is a straightforward version update that aligns with the coordinated versioning strategy across components.components/notion/actions/update-page/update-page.mjs (1)
10-10
: Version Bump Update in Update Page Module
The version is bumped from "1.1.4" to "1.1.5". No changes in logic or behavior are observed—this maintains consistency with other modules.components/notion/actions/retrieve-database-content/retrieve-database-content.mjs (1)
7-7
: Version Bump Update in Retrieve Database Content Module
The module’s version update from "0.0.4" to "0.0.5" is correctly applied, with no alterations to functionality or execution flow.components/notion/notion.app.mjs (4)
24-28
: Good improvement to the user experience!The addition of search functionality to the page selection UI is a valuable enhancement. Updating the description to clarify that users can search for pages and adding the
useQuery
flag enables a more streamlined experience, allowing users to find specific pages quickly instead of browsing through the entire list.
29-35
: Well-implemented search with appropriate filtersGood implementation of the search functionality. The code properly handles the case where no query is provided by defaulting to
undefined
, and the addition of a filter to restrict results to only "page" type objects ensures that users get relevant results.
43-47
: Consistent implementation for database pagesExcellent consistency in implementing the same search functionality for pages within databases. The description update and
useQuery
flag addition maintain a uniform approach across similar components.
50-51
: Proper query parameter passingThe query parameter is correctly passed to the
queryDatabase
method, enabling filtering within a specific database. This completes the search functionality implementation.
Hi everyone, all test cases are passed! Ready for release! Test report |
Adding the query functionality to search for pages, instead of listing them all at once
Summary by CodeRabbit
New Features
Chores