WIP: feat(menu): add link menu item option#867
Open
wallw-dev wants to merge 1 commit intongageoint:masterfrom
Open
WIP: feat(menu): add link menu item option#867wallw-dev wants to merge 1 commit intongageoint:masterfrom
wallw-dev wants to merge 1 commit intongageoint:masterfrom
Conversation
Adds a link option to menu items which is either a string (the URL) or
an object of {href, target, opener, referrer} such as {href:
'somepage.html', target: '_blank'}. The openener and referrer options
are only needed to open windows in the same process, which gives that
page access to window.opener and window.opener.document (those should be
omitted for any external links for security reasons).
johnstacy
pushed a commit
to johnstacy/opensphere
that referenced
this pull request
Mar 10, 2020
…here:THIN-14128 to master * commit '63965092a7ab135b06a935371a1f8104123d851c': feat(theming): fixed colorblind themes when adding an exception theme feat(scss): added content fit styling to scale images
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a link option to menu items which is either a string (the URL) or an object of
{href, target, opener, referrer}such as{href: 'somepage.html', target: '_blank'}. Theopenenerandreferreroptions are only needed to open windows in the same process, which gives that page access towindow.openerandwindow.opener.document(those should be omitted in almost all cases).This is all to address various problems with
window.openthat make it an anti-pattern in JS.WIP because:
goog.window.open. Pretty sure this one is replaceable with further investigation.os.openPopupmay be a legitimate use ofwindow.open, and I'm unsure how to either make that an exception to a conformance violation or implement that differently<a>...</a>are not styled correctlya:hoverstyle, while none of the other options are not (not sure if bug or feature)Also, should we indicate that external links are external (a la Wikipedia)? Should we also force those links into a new tab?