-
Notifications
You must be signed in to change notification settings - Fork 973
Looking 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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getSitesLikeKey
seems not very instinctive to me. Maybe getSiteBySubKey
? And we can extend this function to support more sub key if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darkdh I like that! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry my bad for typo. I think it should be getSitesBySubkey
the plural 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 😄
let location = tab.get('url') | ||
const partitionNumber = tab.get('partitionNumber') !== undefined | ||
? tab.get('partitionNumber') | ||
: undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it supposed to be 0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!) |
Result returned now includes parentFolderId Fixes #8477 Auditors: @bbondy, @NejcZdovc cc: @darkdh Includes: Fixes per feedback per @darkdh
Verified folder test case on Windows 10 x64 |
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 -i
to squash commits (if needed).