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

feat: Replace Notion database ID text field with selection menu #413

Merged
merged 9 commits into from
Jan 1, 2024

Conversation

dvanoni
Copy link
Owner

@dvanoni dvanoni commented Jan 1, 2024

Replace the "Database ID" text field with a selection menu that lists the databases which Notero has access to. This enables directly selecting the desired Notion database instead of having to correctly obtain and paste the database ID. Trouble with this process has been the cause of at least 15 issues: #59 #60 #62 #71 #87 #116 #193 #217 #224 #249 #292 #349 #373 #380 #387

Screenshots

Before After
CleanShot 2023-12-31 at 17 54 35@2x CleanShot 2023-12-31 at 17 51 25@2x

Changes to polyfills

The polyfill for Object.fromEntries used by @notionhq/client was not working in the Notero preferences window because the global object could not be correctly obtained. As such, the call to Object.fromEntries has been replaced with a patch.

The only other polyfills in use were String.prototype.trimEnd and String.prototype.trimStart used by html-to-notion.ts. In this case, we were able to replace these with the "pure" versions from core-js-pure.

Switching from core-js to core-js-pure was able to resolve #319.

Other changes

  • xhtml and xul files are now formatted with Prettier.
  • JSON schema definitions are added to config files to support validation and auto-complete.

Copy link
Contributor

github-actions bot commented Jan 1, 2024

🤖 Build Bot

✅ Successful build

⬇️ Download: notero-0.5.7-308

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
core-js-pure 3.35.0 eval +0 1.07 MB zloirock

🚮 Removed packages: core-js@3.31.1

@dvanoni dvanoni merged commit b4b26b5 into main Jan 1, 2024
5 checks passed
@dvanoni dvanoni deleted the database-menu branch January 1, 2024 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strict mode in core-js errors in Zotero 6
1 participant