-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added dojo theme #77
Added dojo theme #77
Conversation
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
=========================================
- Coverage 99.78% 91.7% -8.08%
=========================================
Files 18 30 +12
Lines 920 1001 +81
Branches 274 278 +4
=========================================
Hits 918 918
- Misses 0 78 +78
- Partials 2 5 +3
Continue to review full report at Codecov.
|
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.
Some questions and comments. Tests should probably be touched up, coverage decreased. Also, I pulled down your branch and the theme didn't work. I ran npm install && grunt
on a clean clone. Example pages loaded fine, but the check box on each page did nothing (and didn't produce any JS errors.) It looked like only the structural classes were applied to elements, not theme classes.
src/button/example/index.ts
Outdated
@@ -4,9 +4,19 @@ import { StatefulMixin } from '@dojo/widget-core/mixins/Stateful'; | |||
import { ProjectorMixin } from '@dojo/widget-core/mixins/Projector'; | |||
import { w, v } from '@dojo/widget-core/d'; | |||
import Button, { ButtonType } from '../../button/Button'; | |||
import dojo from '../../themes/dojo/theme'; |
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 import may be better named something like dojoTheme
to avoid confusion. Applies to all example pages.
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.
good idea
src/button/example/index.ts
Outdated
private _theme: {}; | ||
|
||
themeChange(event: Event) { | ||
console.log('called'); |
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 log statement can be removed. Applies to all example pages.
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.
good catch
@@ -4,7 +4,7 @@ | |||
position: relative; | |||
display: inline-block; | |||
box-sizing: border-box; | |||
width: var(--form-field-width); | |||
width: 200px; |
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.
Should we still use some variables for structural styles just so everything looks consistent even when not themed? It would also help maintainability.
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.
fair comment
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.
I think the initial sweep of this was just to remove it all, we can do a second sweep to add these in after. This PR keeps getting out of date and is a pain to maintain.
.readonly .inputWrapper::before { | ||
border-color: var(--input-border-color); | ||
} | ||
.input {} |
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.
Just clarifying, these empty rulesets have to be defined so they can be themed, right?
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.
yes, correct
src/textarea/example/index.ts
Outdated
this.invalidate(); | ||
} | ||
|
||
onChange(event: Event) { |
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.
Is this function ever used?
src/textinput/example/index.ts
Outdated
this.invalidate(); | ||
} | ||
|
||
onChange(event: Event) { |
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.
Is this function ever used?
@bitpshr as in the comment it requires the linked grunt-dojo2 pr |
@bitpshr this is ready for re-review. |
I think we should make it a priority to get it up to scratch for beta2 :) |
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.
A few log statements and one note about making a ticket before landing, but this looks fine. We should ideally not go down in our coverage though...
@@ -31,27 +31,26 @@ | |||
.results { | |||
position: absolute; | |||
width: 100%; | |||
max-height: var(--select-menu-height); | |||
max-height: 400px; |
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.
Re: the comment above, we should make a ticket to variable-ize the base theme for maintainability and consistency before landing this so we don't lose track of that work.
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.
sure
src/dialog/example/index.ts
Outdated
private _theme: {}; | ||
|
||
themeChange(event: Event) { | ||
console.log('called'); |
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.
console.log
src/slidepane/example/index.ts
Outdated
private _theme: {}; | ||
|
||
themeChange(event: Event) { | ||
console.log('called'); |
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.
console.log
@rishson the above issues I just created are for the next part of this work. this PR enables those issues to be addressed. |
@tomdye indeed they are, and so when I can't remember what they were, I'll dig out this theme PR and have nice links to them. |
Type: feature
The following has been addressed in the PR:
Description:
Created copy of current styles under
dojo-theme
directory.Removing any dojo specific styling from the widget css files.
Added theme switch checkbox to widget example pages.
TODO:
Required Grunt dojo 2 PR for widgets.css OR
m.css
change.Resolves #51