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

Move showTrash from appState to Redux #1901

Merged
merged 4 commits into from
Feb 18, 2020

Conversation

belcherj
Copy link
Contributor

Fix

Requires: #1866 for CREATE_NOTE

Test

  1. Open menu
  2. Click trash
  3. Restore note
  4. Delete note
  5. Trash all notes
  6. Click 'All Notes'
  7. Try to click new note button but realize it is disabled

We do need CREATE_NOTE since you can create a new note from the system menu in Electron

@belcherj belcherj requested a review from a team February 12, 2020 20:25
@belcherj belcherj self-assigned this Feb 12, 2020
lib/state/ui/reducer.ts Outdated Show resolved Hide resolved
Copy link
Member

@dmsnell dmsnell left a comment

Choose a reason for hiding this comment

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

Trash is an odd view. It's not globally boolean, since obviously the tag drawer needs to be open in order to see it. It's not a tag even though it acts like one. It's not really a pane so it's surprising to see it in visiblePanes

Did you consider putting it anywhere else? It's somewhat of a global mode since it governs the buttons too. What do you think would be the tradeoffs of keeping it as a global boolean?

dmsnell added a commit that referenced this pull request Feb 12, 2020
This patch introduces a new set utility library for adding, removing,
and toggling values in a set to make a working "option bag."

It also changes the `visiblePane` state from a list of strings into this
new option bag, removing the reliance on the `lodash` equivalent
functions for using the array.

This is meant to be precursor work for #1901 and #1903
@belcherj belcherj force-pushed the refactor/show-trash-state-to-redux branch from d14afd2 to ae5eefb Compare February 13, 2020 21:43
lib/state/ui/reducer.ts Outdated Show resolved Hide resolved
@belcherj belcherj force-pushed the refactor/show-trash-state-to-redux branch from ae5eefb to 0f65ce5 Compare February 17, 2020 16:53
lib/state/action-types.ts Outdated Show resolved Hide resolved
@belcherj belcherj force-pushed the refactor/show-trash-state-to-redux branch from ad6afca to a6b46fb Compare February 17, 2020 19:05
@belcherj belcherj force-pushed the refactor/show-trash-state-to-redux branch from 899532c to 74d6742 Compare February 17, 2020 21:33
@belcherj belcherj merged commit f5d3033 into develop Feb 18, 2020
@belcherj belcherj deleted the refactor/show-trash-state-to-redux branch February 18, 2020 21:11
@codebykat codebykat added this to the state refactor milestone Oct 21, 2020
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.

3 participants