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

#3640 - macro after reloading the page monomers added to the favorites section disappear #3688

Conversation

Konstantin1996
Copy link
Collaborator

@Konstantin1996 Konstantin1996 commented Dec 11, 2023

How the feature works? / How did you fix the issue?

(Screenshots, videos, or GIFs, if applicable)

closes #3640

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

@Konstantin1996 Konstantin1996 changed the title #3640-macro-after–reloading-the-page-monomers-added-to-the-favorites-section-disappear #3640 - macro after reloading the page monomers added to the favorites section disappear Dec 11, 2023
@Konstantin1996 Konstantin1996 force-pushed the 3640-macro-after-reloading-the-page-monomers-added-to-the-favorites-section-disappear branch from 73b4283 to dd47951 Compare December 14, 2023 13:15
state.favorites = localFavorites;
},

unsetFavoriteMonomersFromLocalStorage: (state: RootState) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would propose to rename it to clearFavoritesState() because this method does not unset something from local storage

});
},

unsetFavoritePresetsFromLocalStorage: (state: RootState) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here.

setItem: (key: string, item: unknown) => void;
}

class LocalStorage implements LocalStorageCopy {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would propose to rename it to LocalStorageWrapper because LocalStorage can be read as native localStorage.
Also why we need interface here? Do we plan to have other classes which implement it?

@rrodionov91 rrodionov91 merged commit d9fa581 into master Dec 28, 2023
5 checks passed
@rrodionov91 rrodionov91 deleted the 3640-macro-after-reloading-the-page-monomers-added-to-the-favorites-section-disappear branch December 28, 2023 09:28
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.

Macro: After reloading the page, monomers added to the Favorites section disappear
2 participants