Repository navigation
chore: clean up TODOs #28657
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
Merged
Merged
chore: clean up TODOs #28657
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
40b30db
test: re-enable skipped tests
liamdebeasi 8e21cff
refactor: picker-column uses single stylesheet
liamdebeasi 1cdbf8f
refactor: remove exportparts
liamdebeasi 5136701
chore: remove unused css
liamdebeasi eb6a630
test: move certain option e2e tests to spec tests
liamdebeasi 17ad797
refactor: PickerColumnItem is unique to datetime
liamdebeasi 93593b1
refactor: remove color prop from column
liamdebeasi 8d20cce
keep styles for empty items
liamdebeasi 817ed8a
Revert "refactor: remove color prop from column"
liamdebeasi 27cda86
Update picker-column.scss
liamdebeasi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
core/src/components/picker-column-option/test/picker-column-option.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import { newSpecPage } from '@stencil/core/testing'; | ||
|
|
||
| import { PickerColumnOption } from '../picker-column-option'; | ||
|
|
||
| describe('picker column option', () => { | ||
| it('button should be enabled by default', async () => { | ||
| const page = await newSpecPage({ | ||
| components: [PickerColumnOption], | ||
| html: ` | ||
| <ion-picker-column-option value="test">Test</ion-picker-column-otion> | ||
| `, | ||
| }); | ||
|
|
||
| const option = page.body.querySelector('ion-picker-column-option')!; | ||
| const button = option.shadowRoot!.querySelector('button')!; | ||
|
|
||
| await expect(button.hasAttribute('disabled')).toEqual(false); | ||
| }); | ||
|
|
||
| it('button should be disabled if specified', async () => { | ||
| const page = await newSpecPage({ | ||
| components: [PickerColumnOption], | ||
| html: ` | ||
| <ion-picker-column-option disabled="true" value="test">Test</ion-picker-column-otion> | ||
| `, | ||
| }); | ||
|
|
||
| const option = page.body.querySelector('ion-picker-column-option')!; | ||
| const button = option.shadowRoot!.querySelector('button')!; | ||
|
|
||
| await expect(button.hasAttribute('disabled')).toEqual(true); | ||
| }); | ||
| }); |
7 changes: 0 additions & 7 deletions
7
core/src/components/picker-column/picker-column-interfaces.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,39 @@ | |
| scrollbar-width: none; | ||
| } | ||
|
|
||
| .picker-item-empty { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I originally thought the old |
||
| @include padding(0); | ||
| @include margin(0); | ||
|
|
||
| display: block; | ||
|
|
||
| width: 100%; | ||
|
|
||
| height: 34px; | ||
|
|
||
| border: 0px; | ||
|
|
||
| outline: none; | ||
|
|
||
| background: transparent; | ||
|
|
||
| color: inherit; | ||
|
|
||
| font-family: $font-family-base; | ||
|
|
||
| font-size: inherit; | ||
|
|
||
| line-height: 34px; | ||
|
|
||
| text-align: inherit; | ||
|
|
||
| text-overflow: ellipsis; | ||
|
|
||
| white-space: nowrap; | ||
|
|
||
| overflow: hidden; | ||
| } | ||
|
|
||
| /** | ||
| * Hide scrollbars on Chrome and Safari | ||
| */ | ||
|
|
@@ -112,66 +145,10 @@ | |
| justify-content: start; | ||
| } | ||
|
|
||
| // TODO FW-5580 remove this | ||
| :host .picker-item { | ||
| @include padding(0); | ||
| @include margin(0); | ||
|
|
||
| display: block; | ||
|
|
||
| width: 100%; | ||
|
|
||
| height: 34px; | ||
|
|
||
| border: 0px; | ||
|
|
||
| outline: none; | ||
|
|
||
| background: transparent; | ||
|
|
||
| color: inherit; | ||
|
|
||
| font-family: $font-family-base; | ||
|
|
||
| font-size: inherit; | ||
|
|
||
| line-height: 34px; | ||
|
|
||
| text-align: inherit; | ||
|
|
||
| text-overflow: ellipsis; | ||
|
|
||
| white-space: nowrap; | ||
|
|
||
| cursor: pointer; | ||
|
|
||
| overflow: hidden; | ||
|
|
||
| scroll-snap-align: center; | ||
| } | ||
|
|
||
| // TODO FW-5580 remove this. | ||
| // Figure out if we still need the .picker-item-empty selector | ||
| :host .picker-item-empty, | ||
| :host .picker-item[disabled] { | ||
| cursor: default; | ||
| } | ||
|
|
||
| // TODO FW-5580 remove this | ||
| :host .picker-item-empty, | ||
| :host(:not([disabled])) .picker-item[disabled] { | ||
| scroll-snap-align: none; | ||
| } | ||
|
averyrousseau marked this conversation as resolved.
Resolved
|
||
|
|
||
| :host(.picker-column-disabled) .picker-opts { | ||
| overflow-y: hidden; | ||
| } | ||
|
|
||
| // TODO FW-5580 remove this | ||
| :host .picker-item[disabled] { | ||
| opacity: 0.4; | ||
| } | ||
|
|
||
| /** | ||
| * When the column is disabled, none of the options | ||
| * should be interactive. However, we do not disable | ||
|
|
@@ -186,11 +163,6 @@ | |
| pointer-events: none; | ||
| } | ||
|
|
||
| // TODO FW-5580 remove this | ||
| :host(.picker-column-active) .picker-item.picker-item-active { | ||
| color: current-color(base); | ||
| } | ||
|
|
||
| @media (any-hover: hover) { | ||
| :host(:focus) .picker-opts { | ||
| outline: none; | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 interface used to live in
picker-column-interfaces. However, it's now really only used for datetime so I decided to move it to the datetime directory. I opted not to include it indatetime/datetime-interfacessince this is a private interface.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.
Also decided to call it "Wheel" since that's the terminology we use with datetime. No functionality has changed though.