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

Update: SVG workand clean up on about pref page #6904

Merged
merged 2 commits into from
Feb 23, 2017
Merged

Update: SVG workand clean up on about pref page #6904

merged 2 commits into from
Feb 23, 2017

Conversation

gyandeeps
Copy link
Contributor

@gyandeeps gyandeeps commented Jan 28, 2017

Test Plan

  1. Go to about:preferences
  2. Look at navigation area on left it should match the below picture (all images being SVG)
  3. The helpful hints should be at the bottom of the navigation area
  4. Click each option (general, search, tabs, etc) and it should have a highlight state also

screen shot 2017-02-15 at 7 31 14 pm

Description

fixes #6931
This is cleanup work to consume svg icons on the about:pref page.

  • 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).

@luixxiul
Copy link
Contributor

Thanks for your hard work. Would you please open an issue or associate this PR to the existing one if any so @bradleyrichter and @bsclifton would review the PR?

@luixxiul luixxiul added needs-info Another team member needs information from the PR/issue opener. refactoring labels Jan 28, 2017
@luixxiul
Copy link
Contributor

luixxiul commented Jan 28, 2017

And I am afraid this work woud need refactoring to Aphrodite (to avoid duplicate work). This is the guideline that might be worth reading if you have not looked at: https://github.com/brave/browser-laptop/blob/master/docs/style.md

CC @bsclifton for an advice

@bsclifton
Copy link
Member

bsclifton commented Jan 30, 2017

@gyandeeps I can help you make this Aphrodite friendly 😄 I should be able to review this soon (hang in there!)

In the meantime, can you create an issue for this? I know we originally wanted to solve the URL bar icons (which is captured with #5891)

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Per our conversation on Slack, @gyandeeps, if you could rework this using the Aphrodite styles that would be great 😄 It would basically involve creating a component and putting the styles in JavaScript. Let me know if I can help in any way. Thanks again! 😄

@cezaraugusto
Copy link
Contributor

@gyandeeps nice work here. Based on @bsclifton request, we have a new wiki page regarding how to refactor styles which may help you:

https://github.com/brave/browser-laptop/wiki/Refactoring-styles-to-Aphrodite

@luixxiul luixxiul added refactoring/aphrodite and removed needs-info Another team member needs information from the PR/issue opener. refactoring labels Feb 4, 2017
@bsclifton bsclifton modified the milestones: 0.13.5, 0.13.4 Feb 8, 2017
@cezaraugusto cezaraugusto self-assigned this Feb 8, 2017
@cezaraugusto
Copy link
Contributor

cezaraugusto commented Feb 15, 2017

Split prefs nav components, refactored to Aphrodite, rebased. Ready for code review.

Note:
Needs resolution about sync tab (disabled on this PR at this moment). /cc @bradleyrichter.

Thanks @gyandeeps for the great initial work. Way better overall styles and flexbox usage. 🎉

const ModalOverlay = require('../components/modalOverlay')
const {SettingsList, SettingItem, SettingCheckbox, SiteSettingCheckbox} = require('../../app/renderer/components/settings')
const {SettingTextbox} = require('../../app/renderer/components/textbox')
const {SettingDropdown} = require('../../app/renderer/components/dropdown')
const Button = require('../components/button')
const HelpfulHints = require('../../app/renderer/components/preferences/helpfulHints')
Copy link
Contributor

Choose a reason for hiding this comment

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

@cezaraugusto should this be deleted?

Copy link
Contributor

@cezaraugusto cezaraugusto Feb 16, 2017

Choose a reason for hiding this comment

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

yes it migrated to preferenceNavigation

@gyandeeps
Copy link
Contributor Author

gyandeeps commented Feb 16, 2017

@cezaraugusto Latest changes broke the change I made, where i moved the lower hint text block to always be at the bottom and on resize stick to the bottom.

Current:

https://cloud.githubusercontent.com/assets/5554486/23006222/2e7ada34-f3c6-11e6-9824-7a224fab27aa.png

Expected:

https://bravesoftware.slack.com/files/bradrichter/F3XQDKR0X/pasted_image_at_2017_01_26_01_43_pm.png

Notes:

  • Avoid using width and height on flexed items. (the rule i follow is to not use height and width if i use flex for the most part). That how things remain fluid and responsive.

@bradleyrichter
Copy link
Contributor

bradleyrichter commented Feb 16, 2017 via email

padding: '30px 0',
marginTop: '20px'
padding: '20px 0 0',
overflowY: 'auto',
Copy link
Contributor

Choose a reason for hiding this comment

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

adding sync and plugins tabs made menu taller, so helpfulHints got cut.

For small displays it adds a scrollbar to address that

padding: '20px 0 0',
overflowY: 'auto',

'@media (min-height: 620px)': {
Copy link
Contributor

Choose a reason for hiding this comment

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

if we have enough display height then put hints at screen's bottom.

Ideally we should do it on navigation itself but then we lost the active indicator (arrow)

@cezaraugusto
Copy link
Contributor

@gyandeeps @bradleyrichter sorry I was unaware of those changes. Updated.

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Great job with the original cleanup @gyandeeps and awesome job @cezaraugusto with the Aphrodite refactor 😄 I put some stubs in place in paymentsTabTest.js and preferencesTest.js to fix broken tests. Other than that, everything looks great! 🎉

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.

Rework about:pref page SVG icons and clean up css/dom
5 participants