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

bookmark endpoints #96

Merged

Conversation

kevinoliveira
Copy link
Member

this feature allows the user to bookmark endpoints, displaying those endpoints on top of all other endpoints. the status of bookmarked is persisted on localStorage.

Screenshots

no bookmarks
image

with bookmarks
image
image

kevin oliveira added 2 commits October 4, 2020 00:30
this feature allows the user to bookmark endpoints, displaying those endpoints on top of all other endpoints. the status of bookmarked is persisted on localstorage.

export function setLocalStorageBookmarks(names: string[]) {
localStorage.setItem(BOOKMARK_LOCALSTORAGE_KEY, JSON.stringify(names));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This will have some issues with browsers limiting local storage, such as lack of space of Safari's icognito mode. Better check that localStorage is actually working and guard it with a try catch, falling back to memory: https://michalzalecki.com/why-using-localStorage-directly-is-a-bad-idea/

Copy link
Member Author

Choose a reason for hiding this comment

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

solved

lbguilherme
lbguilherme previously approved these changes Oct 5, 2020
@lbguilherme
Copy link
Contributor

This branch now has conflicts. Can you take a look?

@kevinoliveira
Copy link
Member Author

for sure!

@lbguilherme lbguilherme merged commit 58c54eb into sdkgen:master Oct 8, 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.

None yet

2 participants