Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Update: Add copy to clipboard for about brave page (fixes #5790) #6107

Merged
merged 1 commit into from
Dec 13, 2016
Merged

Update: Add copy to clipboard for about brave page (fixes #5790) #6107

merged 1 commit into from
Dec 13, 2016

Conversation

gyandeeps
Copy link
Contributor

@gyandeeps gyandeeps commented Dec 9, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Test Plan:

  1. Open Brave
  2. Go to Help > About
  3. Click the copy to clipboard icon
  4. try to paste the copied data into a doc

This is my first PR. I wasn't sure what sort test needs to be written for copy to clipboard functionality.

UI

Same as mentioned in the issue #5790 (comment)

Copied data to clipboard:

Brave: 0.12.13 
Muon: 1.4.28 
libchromiumcontent: 53.0.2785.143 
V8: 5.3.332.47 
Node.js: 6.5.0 
Update Channel: dev 
os.platform: win32 
os.release: 10.0.14393 
os.arch: x64

@bsclifton bsclifton self-assigned this Dec 9, 2016
@bsclifton bsclifton added this to the 0.13.0 milestone Dec 9, 2016
@bsclifton bsclifton assigned darkdh and unassigned bsclifton Dec 9, 2016
@@ -82,6 +82,9 @@ body {
font-size: 16px;
margin-bottom: 12px;
padding-left: @aboutPageSectionPadding;
width: 400px;
display: flex;
justify-content: space-between;
Copy link
Member

@darkdh darkdh Dec 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe we should move these three styles to parent selector of .sectionTitle
so the original sectionTitle style will remain the same.

Present look:
screen shot 2016-12-09 at 13 31 56

Expected look:
screen shot 2016-12-09 at 13 25 49

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if we do so, width: 424px would be aligned

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding margin-right to .aboutAbout .fa-clipboard would work too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the expectation, that we want to move the placement of icon slightly to the left?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't put the icon aligned. What I meant is

<div className='title'>
  <span className='sectionTitle' data-l10n-id='versionInformation' />
   <span className='fa fa-clipboard' title='Copy password to clipboard' onClick={this.onCopy} />
 </div>

We wanna keep the original attribute for version information like orange color.
So we can put the attributes of display and justify-content into .title
And as @luixxiul suggest, we can add margin-right to .fa-clipboard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i see now. Sorry abt that I dint realize we lost the color of the title. Will make the change tonight.

@@ -30,7 +40,10 @@ class AboutBrave extends React.Component {
</div>

<div className='siteDetailsPageContent aboutAbout'>
<div className='sectionTitle' data-l10n-id='versionInformation' />
<div className='sectionTitle'>
<span data-l10n-id='versionInformation' />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the comment in less/about/siteDetails.less

@bbondy bbondy modified the milestones: 0.13.1, 0.13.0 Dec 9, 2016
@gyandeeps
Copy link
Contributor Author

@darkdh I made all the changes mentioned in the comments. Let me know if anything else is needed.

@darkdh
Copy link
Member

darkdh commented Dec 10, 2016

@gyandeeps , great job, thanks!

width: 400px;
display: flex;
justify-content: space-between;
margin-left: @aboutPageSectionPadding;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not be margin-right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

screen shot 2016-12-10 at 14 17 38

That is the same margin-left aligned with the sortable table below

@bbondy
Copy link
Member

bbondy commented Dec 13, 2016

Sorry I had to revert this here: #6184
Because of #6183

@bbondy
Copy link
Member

bbondy commented Dec 13, 2016

Please re-submit a PR once fixed.

Just wanted to also mention I don't think we should be special casing this about page's section title for consistency reasons.

@luixxiul
Copy link
Contributor

I will work on it with cherry-pick

@srirambv srirambv removed this from the 0.12.15 milestone Dec 14, 2016
@srirambv srirambv added this to the 0.13.0 milestone Dec 14, 2016
cezaraugusto pushed a commit that referenced this pull request Dec 20, 2016
Closes #6183

Redo PR #6107 (which was reverted with #6184)

- cherry-picked 942e95c
- Added brave.less for about:brave to fix regression on about pages

TODO: Pick up properties from history.less into brave.less

Auditors: @alexwykoff

Test Plan:
1. Visit about:about
@luixxiul luixxiul removed this from the 0.13.0 milestone Jan 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants