Skip to content

Commit

Permalink
Merge pull request #1889 from 4dn-dcic/copy_wrapper_updates
Browse files Browse the repository at this point in the history
Add CopyWrapper for Access Key Id and Secret in Modal
  • Loading branch information
utku-ozturk authored May 24, 2024
2 parents b0ad8c9 + a686c72 commit 2a17541
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 248 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ fourfront
Change Log
----------

7.5.2
=====

* adds two new props to object.CopyWrapper to allow/prevent sending analytics data into GA4


7.5.1
=====

Expand Down
349 changes: 109 additions & 240 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"@hms-dbmi-bgm/react-workflow-viz": "0.1.7",
"@hms-dbmi-bgm/shared-portal-components": "git+https://github.com/4dn-dcic/shared-portal-components#0.1.83",
"@hms-dbmi-bgm/shared-portal-components": "git+https://github.com/4dn-dcic/shared-portal-components#0.1.84",
"auth0-lock": "^11.33.1",
"d3": "^7.5.0",
"date-fns": "^2.28.0",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
# Note: Various modules refer to this system as "encoded", not "fourfront".
name = "encoded"
version = "7.5.1"
version = "7.5.2"
description = "4DN-DCIC Fourfront"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ const ModalCodeSnippet = React.memo(function ModalCodeSnippet(props){
const plainValue = `cut -f 1 ${filename} | tail -n +3 | grep -v ^# | xargs -n 1 curl -O -L` + (session ? " --user <access_key_id>:<access_key_secret>" : '');
return (
<object.CopyWrapper value={plainValue} className="curl-command-wrapper" data-tip={'Click to copy'}
wrapperElement="div" iconProps={{ }}>
wrapperElement="div" iconProps={{ }} analyticsOnCopy maskAnalyticsValue={false}>
{htmlValue}
</object.CopyWrapper>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,8 @@ export class HiGlassViewConfigTabView extends React.PureComponent {
const gridState = layout.responsiveGridState(windowWidth);
const isMobile = gridState !== 'lg' && gridState !== 'xl';
return (
<object.CopyWrapper data-tip="Copy view URL to clipboard to share with others." includeIcon={false} wrapperElement="button" value={href}>
<object.CopyWrapper data-tip="Copy view URL to clipboard to share with others." includeIcon={false} wrapperElement="button"
value={href} analyticsOnCopy maskAnalyticsValue={false}>
<i className="icon icon-fw icon-copy far"/>
{isMobile ?
<React.Fragment>
Expand Down
8 changes: 6 additions & 2 deletions src/encoded/static/components/item-pages/UserView.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,19 @@ class SyncedAccessKeyTable extends React.PureComponent {
Access Key ID
</div>
<div className="col-8">
<code>{ access_key_id }</code>
<object.CopyWrapper value={access_key_id} data-tip={'Click to copy'} className="d-inline-block"
wrapperElement="div" iconProps={{}} analyticsOnCopy={false}><code>{access_key_id}</code>
</object.CopyWrapper>
</div>
</div>
<div className="row mt-05">
<div className="col-4 text-600 text-right no-user-select">
Secret Access Key
</div>
<div className="col-8">
<code>{ secret_access_key }</code>
<object.CopyWrapper value={secret_access_key} data-tip={'Click to copy'} className="d-inline-block"
wrapperElement="div" iconProps={{}} analyticsOnCopy={false}><code>{secret_access_key}</code>
</object.CopyWrapper>
</div>
</div>
</Modal.Body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ export class TopRow extends React.Component {
{typeInfoVisible ? this.typeInfoLabel() : null}
{ typeInfoVisible && context.accession ?
<object.CopyWrapper value={context.accession} className="accession inline-block" data-tip={accessionTooltip}
wrapperElement="span" iconProps={{ 'style': { 'fontSize': '0.875rem', 'marginLeft': -3 } }}>
wrapperElement="span" iconProps={{ 'style': { 'fontSize': '0.875rem', 'marginLeft': -3 } }}
analyticsOnCopy maskAnalyticsValue={true}>
{context.accession}
</object.CopyWrapper>
: null}
Expand Down
2 changes: 1 addition & 1 deletion src/encoded/static/components/static-pages/StaticPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const parseSectionsContent = memoize(function(context){
value={children}
className={(className || '') + " mt-2"}
wrapperElement="pre"
whitespace={false}>
whitespace={false} analyticsOnCopy maskAnalyticsValue={true}>
{children}
</object.CopyWrapper>
</div>
Expand Down

0 comments on commit 2a17541

Please sign in to comment.