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

Fixes issue 575: change h1 to h4 styled as h1 #587

Conversation

benjaminapetersen
Copy link
Member

  • Update h1 to h4.h1
  • Update id's to be unique via id="empty-state-title-{{$id}}"
  • Update tests
  • Fix typos

@jeff-phillips-18 for review, might be some conventions I should conform to.
@spadgett

Re: update needed for origin-web-console PR 1326 via this comment.

@@ -2,13 +2,13 @@
<div ng-if="$ctrl.config.icon" class="blank-slate-pf-icon">
<span class="{{$ctrl.config.icon}}"></span>
</div>
<h1 id="title">
<h4 id="empty-state-title-{{$id}}" class="h1 title">
Copy link
Member

@dtaylor113 dtaylor113 Aug 22, 2017

Choose a reason for hiding this comment

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

Hi, it's a little confusing having a <h4> with a class of 'h1 title'?

Copy link
Member Author

Choose a reason for hiding this comment

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

h1 is just the bootstrap way to style a different heading as an h1, thats the only reason i kept it. I don't know that we need to keep the class .title either, i just kept it so that the test updates are changes from #title to .title. Def open to any suggestions, was just going for the most minimal changes to make this work!

Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid using title as a class and just use this new id as a selector in the tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Works for me, I'll update.

@@ -2,13 +2,13 @@
<div ng-if="$ctrl.config.icon" class="blank-slate-pf-icon">
<span class="{{$ctrl.config.icon}}"></span>
</div>
<h1 id="title">
<h4 id="empty-state-title-{{$id}}" class="h1 title">
Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid using title as a class and just use this new id as a selector in the tests?

</h1>
<p id="info" ng-if="$ctrl.config.info">
</h4>
<p id="empty-state-info-{{$id}}" class="info" ng-if="$ctrl.config.info">
Copy link
Member

Choose a reason for hiding this comment

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

Can we use this new ID in the tests rather than adding info as a class?

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 can update this in the tests, though want to bring up that someone targeting with css will have a lousy time trying to get at these without a class hook at all (and such a specific id as empty-state-info-54. Are we sure we don't want a hook at all? (I tend to come from the camp that believes you should never write css targeting dom nodes).

Copy link
Member

Choose a reason for hiding this comment

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

OK, I can buy into that. How about using pf-empty-state-xxx for the classes though?

{{$ctrl.config.info}}
</p>
<p id="helpLink" ng-if="$ctrl.config.helpLink">
<p id="empty-state-helpLink-{{$id}}" class="helpLink" ng-if="$ctrl.config.helpLink">
Copy link
Member

Choose a reason for hiding this comment

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

Again...

Copy link
Member Author

Choose a reason for hiding this comment

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

Same reply as above. Just to confirm, I'm ok with the change if y'all are certain something like empty-state-title & empty-state-helplink isn't helpful for those who may need to tweak styles (though I'd prob shorten classes and go for .empty-state .helplink by preference, but I'll update to whatever is current convention).

@jeff-phillips-18
Copy link
Member

Also, we are using semantic versioning now. Please see the Commit Guidelines.

@benjaminapetersen
Copy link
Member Author

Awesome, I'll update to:

fix(empty state): Change h1 to h4 styled as h1, update to use unique id's generated by view

If that works. Is there a convention for scope in <type>(<scope>): <subject>, like emptyState vs Empty State vs Empty State View? I'll look @ past commit history & see if there is anything that stands out & maybe PR the contrib file with a couple contextual examples.

@jeff-phillips-18
Copy link
Member

the just becomes the highlighted word for the fix/enhancement. We should use the component name being updated/added as a convention, so pfEmptyState in this case.

…id's generated by view

- fix issue patternfly#575
- h1 changed to h4 styled as h1
- update id's to be unique using {{$id}}
  - example: id="blank-state-pf-title-{{$id}}"
@benjaminapetersen benjaminapetersen force-pushed the bpeterse/issue/575/empty-state-h1 branch from c47d1ed to cd163eb Compare August 23, 2017 15:23
@benjaminapetersen
Copy link
Member Author

Updated, though I matched classes/ids to blank-state-pf-* as this was already used within the view (rather than pf-empty-state-*).

@dtaylor113 dtaylor113 merged commit 69502a2 into patternfly:master Aug 28, 2017
@benjaminapetersen benjaminapetersen deleted the bpeterse/issue/575/empty-state-h1 branch August 28, 2017 16:56
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