-
Notifications
You must be signed in to change notification settings - Fork 972
Reorganize about pages and less files #10881
Conversation
panelPadding: '18px', | ||
|
||
// about pages | ||
aboutPageMargin: '20px', |
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.
Only this line is added. The others are just grouped below.
|
||
const ipc = window.chrome.ipcRenderer | ||
|
||
// Stylesheets | ||
require('../../less/switchControls.less') |
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.
This is duping to https://github.com/brave/browser-laptop/pull/10881/files#diff-b79e96c438a5b97dc31f04f68d4817a7R7 on common.less
@@ -1,19 +1,13 @@ | |||
@import "./siteDetails.less"; |
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.
deprecated thanks to https://github.com/brave/browser-laptop/pull/10881/files#diff-237402632b025505a0517d846e9e32c1R34 on history.js
@@ -1,4 +1,8 @@ | |||
@import "./common.less"; |
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.
@@ -13,10 +17,12 @@ | |||
padding: 0; | |||
} | |||
|
|||
html, body, #appContainer, #appContainer > div { | |||
height: 100%; | |||
} |
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.
deprecated with https://github.com/brave/browser-laptop/pull/10881/files#diff-4b50ff14dadc9756719a577a72f520d6R7 on preferences.less. height:100% is required on preferences.js only.
@@ -21,6 +21,7 @@ const aboutActions = require('../../../../js/about/aboutActions') | |||
const windowActions = require('../../../../js/actions/windowActions') | |||
|
|||
// Stylesheets | |||
require('../../../../less/about/siteDetails.less') |
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.
moved from https://github.com/brave/browser-laptop/pull/10881/files#diff-9161cb086bf3eb720aab15d7172f6e4fL1 on bookmarks.less
const commonStyles = require('../../app/renderer/components/styles/commonStyles') | ||
|
||
const { | ||
AboutPageSectionTitle, | ||
AboutPageSectionSubTitle | ||
} = require('../../app/renderer/components/common/sectionTitle') | ||
|
||
require('../../less/about/history.less') |
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.
Removed along with https://github.com/brave/browser-laptop/pull/10881/files#diff-6f6a63435cccded794332a0616b5f0e3L7, in favor of the converted styles below and siteDetails.less
, which is more straightforward.
@@ -9,8 +9,8 @@ const messages = require('../constants/messages') | |||
const ipc = window.chrome.ipcRenderer | |||
const {isSourceAboutUrl, getTargetAboutUrl} = require('../lib/appUrlUtil') | |||
|
|||
require('../../less/button.less') |
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.
Deprecated with common.less
@@ -8,8 +8,8 @@ const BrowserButton = require('../../app/renderer/components/common/browserButto | |||
const appActions = require('../../js/actions/appActions') | |||
const tabActions = require('../../app/common/actions/tabActions') | |||
|
|||
require('../../less/button.less') |
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.
Deprecated with https://github.com/brave/browser-laptop/pull/10881/files#diff-b79e96c438a5b97dc31f04f68d4817a7R6 on common.less
js/about/history.js
Outdated
@@ -30,6 +30,8 @@ const { | |||
} = require('../../app/renderer/components/common/sectionTitle') | |||
|
|||
// Stylesheets | |||
require('../../less/about/common.less') | |||
require('../../less/about/siteDetails.less') |
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.
Added as this is no longer imported on history.less
@@ -63,10 +63,9 @@ const ipc = window.chrome.ipcRenderer | |||
const hintCount = 3 | |||
|
|||
// Stylesheets | |||
require('../../less/switchControls.less') |
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.
Removed based on https://github.com/brave/browser-laptop/pull/10881/files#diff-b79e96c438a5b97dc31f04f68d4817a7R7 on common.less
require('../../less/forms.less') | ||
require('../../less/button.less') |
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.
@@ -7,8 +7,8 @@ const BrowserButton = require('../../app/renderer/components/common/browserButto | |||
|
|||
const {StyleSheet, css} = require('aphrodite/no-important') | |||
|
|||
require('../../less/button.less') |
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.
Removed based on https://github.com/brave/browser-laptop/pull/10881/files#diff-b79e96c438a5b97dc31f04f68d4817a7R6 on common.less
@@ -1,4 +1,8 @@ | |||
@import "./common.less"; |
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.
Removed as it is required directly on autofill.js See: https://github.com/brave/browser-laptop/pull/10881/files#diff-f3189199f630a8432fae752aa453b2ccR15
@@ -1,4 +1,8 @@ | |||
@import "./siteDetails.less"; |
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.
@import "../animations.less"; | ||
@import "./common.less"; |
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.
@@ -1,12 +1,11 @@ | |||
@import "./common.less"; |
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.
} | ||
|
||
body { | ||
background: @veryLightGray; |
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.
Deprecated with https://github.com/brave/browser-laptop/pull/10881/files#diff-b79e96c438a5b97dc31f04f68d4817a7R22 on common.less.
As common.less is required on all of the about js files, it should not cause a regression.
@import "./variables.less"; | ||
@import "./button.less"; | ||
@import "./about/siteDetails.less"; | ||
@import "variables.less"; |
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.
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.
Left comments for reference, thanks.
Adding the impact/high label as there is a possibility of visual regressions. |
|
||
const { | ||
AboutPageSectionTitle, | ||
AboutPageSectionSubTitle | ||
} = require('../../app/renderer/components/common/sectionTitle') | ||
|
||
require('../../less/about/history.less') |
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.
Removed as siteDetails*
classes are no longer applied.
Codecov Report
@@ Coverage Diff @@
## master #10881 +/- ##
==========================================
+ Coverage 54.54% 54.55% +<.01%
==========================================
Files 275 275
Lines 26144 26146 +2
Branches 4196 4196
==========================================
+ Hits 14261 14263 +2
Misses 11883 11883
|
@cezaraugusto this PR is blocked by #10951 (for buttons on about:autofill). I would like to see #10951 reviewed before this one 😄 |
Closes #10700 Closes #10880 Addresses #8056 - Add less/about/common.less to the about js files - Add globalStyles.spacing.aboutPageMargin - Add the MPL license header - Remove import from the less files - Remove button.less from common.less - Remove require of the less files imported in common.less to avoid duplicates - Move the height:100% property from common.less to preferences.less Auditors: Test Plan 1: npm run unittest Test Plan 2: 1. Open about:about 2. Open all linked about pages 3. Make sure they are properly styled 4. Open https://webtorrent.io/free-torrents 5. Open a torrent link 6. Make sure the webtorrent viewer is properly styled Test Plan 3: 1. Open https://expired.badssl.com/ 2. Open http://downloadme.org/ 3. Open http://brave.rules/ 4. Make sure all error pages do not have the black background color Test Plan 4: 1. Open about:brave 2. Change the window size 3. Make sure the scroll bar does not appear
Closes #8056 Auditors: Test Plan: 1. Open about:about 2. Make sure the page is properly rendered
Closes #11120 - about - adblock - autofill - brave - downloads - extensions - passwords Auditors: Test Plan: 1. Open about:about 2. Open about:adblock 3. Open about:autofill 4. Open about:brave 5. Open about:downloads 6. Open about:extensions 7. Make sure the section titles are styled in the same way
left a comment in #10951 the text inside buttons doesn't seem ok to me, mind checking there what's happening? |
Let me close the PR until I'll find a better fix on #10951. |
Requires #10951 for buttons on about:autofill.
Fixes #10711
Closes #8056
Closes #10700
Closes #10712
Closes #10880
Closes #11120
Please have a look at #10880 why I thought this reorganization is important, thanks.
Test Plans
1st commit
Closes #10700
Closes #10880
Addresses #8056
Test Plan 1:
npm run unittest
Test Plan 2:
about:about
Test Plan 3:
https://expired.badssl.com
(for certerror.js)https://brave.rules
(for errorPage.js)about:preferences
(for preferences.js)http://downloadme.org
(for safebrowsing.js)Test Plan 4:
about:brave
2nd commit
Fixes #10711
Closes #10712
Test Plan:
3rd commit
Closes #8056
Test Plan:
4th commit
Closes #11120
Test Plan:
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests