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

Theme: SlidePane #248

Merged
merged 13 commits into from
Jul 26, 2017
Merged

Theme: SlidePane #248

merged 13 commits into from
Jul 26, 2017

Conversation

bitpshr
Copy link
Member

@bitpshr bitpshr commented Jul 11, 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:

This PR adds an initial theme for the SlidePane component.

screen shot 2017-07-11 at 4 18 24 pm

@bitpshr bitpshr requested review from smhigley and tomdye July 11, 2017 20:21
@bitpshr bitpshr changed the title SlidePane theme Theme: SlidePane Jul 11, 2017
Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

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

Looks good! Just added some minor changes and a couple variable naming comments.

title,
v('button', {
classes: this.classes(css.close),
innerHTML: closeText,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we're generally going with text as a child over innerHTML, although I'm not sure how much it matters

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I know it's a bit of a pain, but with this structure the slidepane's label text will include the close button text

.pane {
background: var(--dojo-white);
border: var(--border-thin) solid var(--border-color);
box-shadow: var(--drop-shadow);
Copy link
Contributor

Choose a reason for hiding this comment

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

I used --box-shadow-dimensions for use with custom colors for inputs, but the shadow dimensions were different for those. We should probably think of better naming 😝

}

.close:after {
content: '✕';
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't need to be now, but at some point this should probably be an icon (I think it is in the designs)

--dojo-light-gray: #F4F6F7;
--dojo-dark-gray: #5C6C7C;

--pane-bg: var(--dojo-white);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine leaving out variable names that are this specific. I think if the name references a specific widget, it doesn't need to be a separate variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed. I use --pane-bg in a few components so far, so I'll leave this in for now.

@codecov
Copy link

codecov bot commented Jul 11, 2017

Codecov Report

Merging #248 into master will decrease coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
- Coverage   98.95%   98.89%   -0.06%     
==========================================
  Files          24       24              
  Lines        1429     1445      +16     
  Branches      413      421       +8     
==========================================
+ Hits         1414     1429      +15     
- Partials       15       16       +1
Impacted Files Coverage Δ
src/slidepane/SlidePane.ts 98.79% <100%> (-1.21%) ⬇️
src/dialog/Dialog.ts 96.77% <100%> (+0.1%) ⬆️

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 1f443f4...bc91cab. Read the comment docs.

@tomdye
Copy link
Member

tomdye commented Jul 12, 2017

Can you please make sure that the outermost element (including the underlay) has a root class on it. Previously when I was trying to theme slidepane for a client project I had trouble increasing the z-index as this was not available.
Also likely that you're going to need to add some fixed classes to maintain layout when this is themed.

Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

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

Same comment as dialog -- would be nice to have a focus style for the close button, but otherwise looks good to me

Copy link
Member

@tomdye tomdye left a comment

Choose a reason for hiding this comment

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

I think this needs Fixed classes to separate out the structural styles from the theme.

@bitpshr
Copy link
Member Author

bitpshr commented Jul 21, 2017

@tomdye: Good catch. SlidePane especially needs to use fixed classes to maintain even basic usability. I took care of this and updated the test harness expected renders.

@bitpshr bitpshr merged commit 58112f2 into dojo:master Jul 26, 2017
@bitpshr bitpshr deleted the slidepane-theme branch July 26, 2017 16:46
@dylans dylans added this to the 2017.07 milestone Aug 9, 2017
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.

4 participants