This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 974
Created session helper for newTabState #5361
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lgtm |
awesome! lgtm 👌 |
nice cleanup! Please add some tests and what do you think about naming it |
- site will only be added if it's a bookmark or history item - site will only be removed if it's a bookmark or history item - site moves are now ignored - favicon is now updated for the newTabState (which is a different list than AppState.sites) Fixes #5357 Fixes #5310 Auditors: @bridiver - check out the new session helper; hope I did this right :) @darkdh - this fixes the folder delete issue by ignoring folders @cezaraugusto - move is no longer tracked (which is fine; we don't care about the order of the items with regard to their position in bookmarks toolbar, which is what moveSite is for). Also, see the new session helper (which we can use for ordering by # visits) Test Plan: 1. Launch Brave and visit brave.com 2. Open a new tab (about:newtab) and confirm you see brave.com there (favicon should show also) 3. Visit about:history and delete the visit you just made to brave.com 4. Confirm it's now gone in about:newtab
@bridiver renamed and also added test cases 😄 Took a while to get it all sorted, but really glad I added them While writing the tests, I realized that the remove wasn't working and ended up updating the code to only add the site info, (not the tags). If you look at siteUtil.removeSite, it never actually deletes the entry (unless the tags are empty). By excluding the tags, the remove will always work (instead of keeping the entry for history) |
++ |
3 tasks
This was referenced Nov 10, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
git rebase -i
to squash commits (if needed).Created session helper for newTabState
Fixes #5357
Fixes #5310
Auditors:
@bridiver - check out the new session helper; hope I did this right :)
@darkdh - this fixes the folder delete issue by ignoring folders
@cezaraugusto - move is no longer tracked (which is fine; we don't care about the order of
the items with regard to their position in bookmarks toolbar, which is what moveSite is for).
Also, see the new session helper (which we can use for ordering by # visits)
Test Plan: