Skip to content
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

Merged
merged 8 commits into from
Apr 21, 2017
Merged

Added dojo theme #77

merged 8 commits into from
Apr 21, 2017

Conversation

tomdye
Copy link
Member

@tomdye tomdye commented Mar 17, 2017

Type: feature

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit or Functional tests are included 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.

button-theme

TODO:

  • fix variables file
  • complex components
    • range
    • side pane
    • dialog

Required Grunt dojo 2 PR for widgets.css OR m.css change.

Resolves #51

@codecov
Copy link

codecov bot commented Mar 17, 2017

Codecov Report

Merging #77 into master will decrease coverage by 8.07%.
The diff coverage is 31.81%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/tabpane/TabPane.ts 98.91% <0%> (-1.09%) ⬇️
src/themes/dojo/theme.ts 0% <0%> (ø)
src/slidepane/SlidePane.ts 98.57% <100%> (ø) ⬆️
src/select/Select.ts 99.35% <100%> (ø) ⬆️
src/button/Button.ts 100% <100%> (ø) ⬆️
src/combobox/ResultMenu.ts 100% <100%> (ø) ⬆️
src/combobox/ComboBox.ts 98.79% <33.33%> (-1.21%) ⬇️
_build/themes/dojo/slidePane.m.css.js 0% <0%> (ø)
_build/themes/dojo/textinput.m.css.js 0% <0%> (ø)
_build/themes/dojo/slider.m.css.js 0% <0%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ae7f14...32f3f5c. Read the comment docs.

@dylans dylans added this to the 2017.03 milestone Mar 18, 2017
@rishson rishson added the beta2 label Mar 30, 2017
@dylans dylans modified the milestones: 2017.03, 2017.04 Apr 2, 2017
Copy link
Member

@bitpshr bitpshr left a 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.

@@ -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';
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

good idea

private _theme: {};

themeChange(event: Event) {
console.log('called');
Copy link
Member

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.

Copy link
Member Author

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;
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

fair comment

Copy link
Member Author

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 {}
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, correct

this.invalidate();
}

onChange(event: Event) {
Copy link
Member

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?

this.invalidate();
}

onChange(event: Event) {
Copy link
Member

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?

@tomdye
Copy link
Member Author

tomdye commented Apr 7, 2017

@bitpshr as in the comment it requires the linked grunt-dojo2 pr

@tomdye tomdye requested a review from agubler April 21, 2017 10:43
@tomdye
Copy link
Member Author

tomdye commented Apr 21, 2017

@bitpshr this is ready for re-review.
I think we need to make our mind up as to if we drop the dojo-theme until it's done? ie. I don't think we should ship it with beta 2 unless it's upto scratch.

@dylans
Copy link
Member

dylans commented Apr 21, 2017

I think we should make it a priority to get it up to scratch for beta2 :)

@tomdye
Copy link
Member Author

tomdye commented Apr 21, 2017

@dylans that is what I was getting at.
This is part one of the theme work. Next stage is to sanitise class names / base theme and then write the dojo theme. We will certainly need @itorrey input to achieve the last part.

Copy link
Member

@bitpshr bitpshr left a 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;
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure

private _theme: {};

themeChange(event: Event) {
console.log('called');
Copy link
Member

Choose a reason for hiding this comment

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

console.log

private _theme: {};

themeChange(event: Event) {
console.log('called');
Copy link
Member

Choose a reason for hiding this comment

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

console.log

@rishson
Copy link
Contributor

rishson commented Apr 21, 2017

Refs #122 #123 #124

@tomdye
Copy link
Member Author

tomdye commented Apr 21, 2017

@rishson the above issues I just created are for the next part of this work. this PR enables those issues to be addressed.

@rishson
Copy link
Contributor

rishson commented Apr 21, 2017

@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.

@tomdye tomdye merged commit 185b54e into dojo:master Apr 21, 2017
@tomdye tomdye mentioned this pull request Jan 30, 2020
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create initial theme
4 participants