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: enable importing specific notes #135

Merged
merged 16 commits into from
Dec 11, 2022

Conversation

alixlahuec
Copy link
Owner

@alixlahuec alixlahuec commented Dec 10, 2022

Description

Update the behavior for the Import notes button in the CitekeyMenu component, to open a dialog instead of directly triggering import. The modal enables the user to select which annotations/notes they want to import, with some convenience selectors (Select/Unselect all ; Select/Unselect all from a given day).

  • Annotations text/highlight are ellipsized, notes content is masked - all have their full content in title
  • If there is only one item for a given day entry, there is no sub-checkbox shown

The PR also updates codecov's patch config, to tolerate coverage decreases below < 5%.

Validation

✅ Storybook testing, with interactions
Dev build

  • Open a citekey page where the item has linked notes, click on "Import notes", select only certain notes and import. The notes are correctly added to the page, in the right place.
  • Force an import error (passing a custom function that doesn't exist) -> the extension shows a toaster, dialog stays open

image
image

@linear
Copy link

linear bot commented Dec 10, 2022

RM-36 Enable import of selected notes vs all notes

  • When the "Import notes" button is used, open a modal with all the item's notes/annotations and allow the user to select which notes to import
    • Default: all notes selected
    • Interface
      • Include checkbox to select/unselect all
      • Sort + group by date (added / modified?)
      • Distinguish notes vs text annotations vs image annotations
      • Limit character count/size taken up on screen

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2022

Codecov Report

Merging #135 (c7d9423) into beta (5216069) will increase coverage by 0.03%.
The diff coverage is 86.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##             beta     #135      +/-   ##
==========================================
+ Coverage   86.87%   86.90%   +0.03%     
==========================================
  Files         122      125       +3     
  Lines        4081     4165      +84     
  Branches     1168     1186      +18     
==========================================
+ Hits         3545     3619      +74     
- Misses        522      532      +10     
  Partials       14       14              
Impacted Files Coverage Δ
src/propTypes.js 100.00% <ø> (ø)
src/components/GraphWatcher/Menus/CitekeyMenu.jsx 79.73% <20.00%> (-1.09%) ⬇️
src/components/NotesImport/index.jsx 83.73% <83.73%> (ø)
src/components/NotesImport/Item/index.jsx 96.00% <96.00%> (ø)
src/components/NotesImport/DayList.jsx 100.00% <100.00%> (ø)

@alixlahuec alixlahuec marked this pull request as ready for review December 10, 2022 22:32
@alixlahuec alixlahuec merged commit 598a708 into beta Dec 11, 2022
@alixlahuec alixlahuec deleted the feature/rm-36-enable-import-of-selected-notes-vs-all branch December 11, 2022 00:56
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.

2 participants