Skip to content

fix(components): update to include mode classes on missing components - #17838

Merged
brandyscarney merged 43 commits into
masterfrom
test-updates
Apr 16, 2019
Merged

brandyscarney merged 43 commits into
masterfrom
test-updates

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Mar 20, 2019 •

Copy link
Copy Markdown
Member

Short description of what this resolves:

Adds the mode class to the components that don't have it & need it, for example:

<ion-card>

⬇️⬇️⬇️

<!-- in iOS -->
<ion-card class="ios">

<!-- in MD -->
<ion-card class="md">

Removed mode-less component classes from the internal CSS & component:

.slides {
  // some CSS
}

⬇️⬇️⬇️

ion-slides {
  // some CSS
}

Changes proposed in this pull request:

  • Removed the internal component (mode-less) classes from the following (for example, .card-content, .footer) and, if it was being used to target the element in the CSS, replaced it with the element's tag:
    • ion-card-content
    • ion-footer
    • ion-header
    • ion-infinite-scroll-content
    • ion-item-group
    • ion-list
    • ion-picker
    • ion-refresher
    • ion-slides
    • ion-split-pane
  • Added tests to make sure item is added as a class to the following:
    • ion-item
    • ion-item-divider
    • ion-item-group
  • Added tests to make sure button is added as a class to the following:
    • ion-button
    • ion-back-button
    • ion-menu-button
  • Added tests to verify the following have their mode specific classes (e.g. card-content-md) still for internal styling:
    • ion-card-content
    • ion-footer
    • ion-header
    • ion-infinite-scroll-content
    • ion-item-group
    • ion-item-options
    • ion-list
    • ion-picker
    • ion-refresher
    • ion-slides
    • ion-split-pane

Fixes: #17608

Components that do not need mode classes ✅

  • action-sheet-controller
  • alert-controller
  • keyboard-controller
  • loading-controller
  • menu-controller
  • modal-controller
  • nav-pop
  • nav-push
  • nav-set-root
  • nav
  • picker-controller
  • platform
  • popover-controller
  • route-redirect
  • route
  • router-outlet
  • router
  • tab
  • tabs
  • toast-controller
  • virtual-scroll

Components lacking mode classes ❌

✅ - component has classes added for mode (ios, md)
📝 - e2e test checking for classes has been added

Class Test Component Type
✅ 📝 action-sheet scoped
✅ 📝 alert scoped
✅ 📝 anchor shadow
✅ 📝 app
✅ 📝 avatar shadow
✅ 📝 back-button scoped
✅ 📝 backdrop shadow
✅ 📝 badge shadow
✅ 📝 button shadow
✅ 📝 buttons scoped
✅ 📝 card-content
✅ 📝 card-header shadow
✅ 📝 card-subtitle shadow
✅ 📝 card-title shadow
✅ 📝 card scoped
✅ 📝 checkbox shadow
✅ 📝 chip shadow
✅ 📝 col
✅ 📝 content shadow
✅ 📝 datetime shadow
✅ 📝 fab-button shadow
✅ 📝 fab-list shadow
✅ 📝 fab
✅ 📝 footer
✅ 📝 grid shadow
✅ 📝 header
✅ 📝 icon
✅ 📝 img shadow
✅ 📝 infinite-scroll
✅ 📝 infinite-scroll-content
✅ 📝 input scoped
✅ 📝 item-divider shadow
✅ 📝 item-option shadow
✅ 📝 item-options
✅ 📝 item-sliding
✅ 📝 item shadow
✅ 📝 item-group
✅ 📝 label scoped
✅ 📝 list
✅ 📝 list-header shadow
✅ 📝 loading scoped
✅ 📝 menu-button shadow
✅ 📝 menu-toggle shadow
✅ 📝 menu shadow
✅ 📝 modal scoped
✅ 📝 note shadow
✅ 📝 picker scoped
✅ 📝 picker-column
✅ 📝 popover scoped
✅ 📝 progress-bar shadow
✅ 📝 radio-group
✅ 📝 radio shadow
✅ 📝 range shadow
✅ 📝 refresher
✅ 📝 refresher-content
✅ 📝 reorder-group
✅ 📝 reorder shadow
✅ 📝 ripple-effect shadow
✅ 📝 row shadow
✅ 📝 searchbar scoped
✅ 📝 segment-button shadow
✅ 📝 segment scoped
✅ 📝 select-option shadow
✅ 📝 select-popover scoped
✅ 📝 select shadow
✅ 📝 skeleton-text shadow
✅ 📝 slide
✅ 📝 slides shadow
✅ 📝 spinner shadow
✅ 📝 split-pane
✅ 📝 tab-bar shadow
✅ 📝 tab-button shadow
✅ 📝 text shadow
✅ 📝 textarea scoped
✅ 📝 thumbnail shadow
✅ 📝 title shadow
✅ 📝 toast shadow
✅ 📝 toggle shadow
✅ 📝 toolbar shadow

@ionitron-bot ionitron-bot Bot added the package: core @ionic/core package label Mar 20, 2019

@liamdebeasi liamdebeasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking really good!

@brandyscarney
brandyscarney marked this pull request as ready for review March 21, 2019 22:16

@liamdebeasi liamdebeasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks great! 🎉

Comment thread core/src/utils/test/utils.ts Resolved
Comment thread core/src/utils/test/utils.ts Resolved
@brandyscarney

Copy link
Copy Markdown
Member Author

Screen Shot 2019-03-26 at 2 01 57 PM

this broke the toolbar/scenario test

@brandyscarney

Copy link
Copy Markdown
Member Author

The bug in my last comment is directly related to #17876

@brandyscarney

Copy link
Copy Markdown
Member Author

@liamdebeasi Could you take another look at this? I think the classes themselves are all good, I added it to ionicons and updated the dependency. I reverted the change with title because I think trying to remove the mode classes may be a breaking change and I want to investigate that more.

@brandyscarney
brandyscarney merged commit e5c8c10 into master Apr 16, 2019
@brandyscarney
brandyscarney deleted the test-updates branch April 16, 2019 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants