This repository has been archived by the owner. It is now read-only.
Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upLooking up site using tab details now considers provisionalLocation #8588
Conversation
js/state/siteUtil.js
Outdated
| @@ -444,14 +444,69 @@ module.exports.getDetailFromFrame = function (frame, tag) { | |||
| }) | |||
| } | |||
|
|
|||
| module.exports.getDetailFromTab = function (tab, tag) { | |||
| const getSitesLikeKey = (sites, siteKey, tag) => { | |||
| if (!sites || !siteKey) { | |||
This comment has been minimized.
This comment has been minimized.
darkdh
May 1, 2017
Member
getSitesLikeKey seems not very instinctive to me. Maybe getSiteBySubKey? And we can extend this function to support more sub key if needed
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| let location = tab.get('url') | ||
| const partitionNumber = tab.get('partitionNumber') !== undefined | ||
| ? tab.get('partitionNumber') | ||
| : undefined |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bsclifton
May 2, 2017
Author
Member
I left as undefined so that it would skip the below code, which only sets if the value is truthy:
if (partitionNumber) {
siteDetail.partitionNumber = partitionNumber
|
@darkdh updated per feedback (reviewers: please don't merge without squashing!) |
|
Verified folder test case on Windows 10 x64 |
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.
bsclifton commentedApr 30, 2017
•
edited
Test Plan
folder case
redirect case
Description
This PR fixes two bugs with pinned tabs
Looking up site using tab details now considers provisionalLocation
Result returned now includes parentFolderId
Fixes #8477
Auditors: @bbondy, @NejcZdovc
cc: @darkdh
git rebase -ito squash commits (if needed).