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: rewrite todo cards logic #1291

Merged
merged 1 commit into from
Oct 9, 2023
Merged

feat: rewrite todo cards logic #1291

merged 1 commit into from
Oct 9, 2023

Conversation

limpbrains
Copy link
Collaborator

@limpbrains limpbrains commented Oct 4, 2023

Description

To fix and simplify Todo cards logic I refactored it's logic. Now cards list derived from state, rathen than be stored in redux state. No more addTodo and removeTodo actions.
For example:

  • show PIN card if no PIN has been set
  • show Lighning Transfer in progress card if claimedBalance > 0

All cards logic is now in todosFullSelector and there are tests for it.

Also I've replaced lodash/* libs with one.

Linked Issues/Tasks

closes #1162

Type of change

Refactoring

Tests

Unit test

@limpbrains limpbrains force-pushed the suggestions branch 3 times, most recently from 8c1ac36 to 4a24ba7 Compare October 6, 2023 13:03
@limpbrains limpbrains requested a review from pwltr October 6, 2023 13:23
@limpbrains limpbrains marked this pull request as ready for review October 6, 2023 13:43
@pwltr
Copy link
Collaborator

pwltr commented Oct 6, 2023

Nice, way cleaner than before. Just a couple of findings:

  • 'lightningReady' and 'Instant Payments Ready' toast should only show for the first channel, for every extra channel 'transferToSpending' and no toast message
  • 'Reset Suggestions' button is not resetting all cards, shows 'lightningReady' card if there is a open channel
  • When I disable my PIN code the green card shows again, I think it should stay hidden
  • After restore, 'profile' card shows again

src/store/reselect/todos.ts Show resolved Hide resolved
@limpbrains
Copy link
Collaborator Author

limpbrains commented Oct 9, 2023

'lightningReady' and 'Instant Payments Ready' toast should only show for the first channel, for every extra channel 'transferToSpending' and no toast message

Lets keep it for now. It is still nice to have this confirmatioln when you channel is finally open, even if you already have one

'Reset Suggestions' button is not resetting all cards, shows 'lightningReady' card if there is a open channel

fixed

When I disable my PIN code the green card shows again, I think it should stay hidden

fixed

After restore, 'profile' card shows again

will fix in #398 someday :)

@pwltr
Copy link
Collaborator

pwltr commented Oct 9, 2023

Lets keep it for now. It is still nice to have this confirmatioln when you channel is finally open, even if you already have one

Fine with me but maybe check with Aldert as this is not how it is in the design.

'Reset Suggestions' button is not resetting all cards, shows 'lightningReady' card if there is a open channel

This issue is still there:

Simulator.Screen.Recording.-.iPhone.14.-.2023-10-09.at.14.36.20.mp4

src/screens/Settings/Suggestions/index.tsx Outdated Show resolved Hide resolved
@limpbrains
Copy link
Collaborator Author

This issue is still there:

I don't think this is an issue, you have already setup lightning. "Fixing" this requires more complexity.

@limpbrains limpbrains merged commit 8eb8006 into master Oct 9, 2023
@limpbrains limpbrains deleted the suggestions branch October 9, 2023 14:34
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.

[Bug]: Pulsing animation remain displayed
2 participants