-
Notifications
You must be signed in to change notification settings - Fork 77
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
refactor(tabs, tab, tab-nav, tab-title): getElementProp
is refactored out in favor of inheritable props set directly on parent
#7605
Merged
Elijbet
merged 60 commits into
main
from
elijbet/6038-refactor-getElementProp-tab-title
Oct 30, 2023
Merged
Changes from 30 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
cefb472
refactor(tabs, tab, tab-nav, tab-title): getElementProp is refactored…
Elijbet 9f05d24
include tab scale
Elijbet 7f5a322
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 3f704d3
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 44db41f
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 27c8c25
update tests per new changes
Elijbet b322908
adjust tab-nav tests to asserting on scales being inherited and not r…
Elijbet 4b572a4
make testing scale inheritance down the ancestry tree dry
Elijbet c106a94
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet c64c5fc
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet c5fa9bf
update tabs test per new requirements: attribute is no longer reflect…
Elijbet 85c5b5d
cleanup
Elijbet 88df173
cleanup
Elijbet 4fba6d2
clean loop with absent value
Elijbet 6fd166b
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 41fefb6
refactor selectors out into resources, other refactors
Elijbet 07d83bf
Refactor tab-nav scale test into one compact it block
Elijbet c17919e
add a class selector and refactor test loop
Elijbet e9a4969
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet c1500e8
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 25529f7
refactor use of attribute scale as selector and use a dynamically add…
Elijbet 5d9254e
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet e115f45
cleanup tabs
Elijbet cf561c7
cleanup
Elijbet 336ea70
use a css selector instead of an attribute selector in the tabs for p…
Elijbet 342851e
cleanup old test setup
Elijbet d939191
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet c86e482
cleanup
Elijbet eac7b60
combine and simplify to make tests DRY
Elijbet 9bef438
simplify tab-title tests
Elijbet edebe99
revert some refactors
Elijbet b9fd2c7
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 60a473f
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 2a1c695
refactor invalid test and cleanup docs
Elijbet e170cd5
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet b4bfbdf
cleanup
Elijbet 9a96bcd
allocate resources per component
Elijbet d5af714
use for...x loop since forEach is not async.
Elijbet 55160f8
consolidate duplication in tests
Elijbet 5cbc0e0
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 948907a
update the mutation observer callback to bail if the mutation target …
Elijbet e29a715
query for a single tab-nav
Elijbet 4084fec
update queries to ignore nested tabs
Elijbet 596a7b0
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet ba66370
refactor out redundancies in the tests and resources
Elijbet 00d97cc
doc editing
Elijbet bb8aa60
adjust flex on center and inline with the new selectors
Elijbet 4293d25
🎲
Elijbet 404cae5
drop any test checking visual changes, clean up duplication in css, a…
Elijbet 37b877c
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet d4e508e
add screenshot coverage for simle center/inline/border scale variations
Elijbet c1a9c9d
cleanup
Elijbet d2b10fc
make these styles more robust by using a class vs an element
Elijbet 9288052
set of screenshot tests to cover various scenarios for scales
Elijbet 468787e
use a class method vs an assigned-bound function
Elijbet 6aa6c87
rework margin application based on new scale class selectors vs attri…
Elijbet 52ff51c
fix to missing inline tab gap and make sure tabs doesn't push it's in…
Elijbet ff3defb
fix omission
Elijbet 3184404
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet f065e26
Merge branch 'main' into elijbet/6038-refactor-getElementProp-tab-title
Elijbet 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 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 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 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 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
14 changes: 8 additions & 6 deletions
14
packages/calcite-components/src/components/tab-nav/usage/Basic.md
This file contains 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
When tab-nav is the only parent, tab-title can inherit its `scale` and `position` from tab-nav: | ||
Tab-nav and tab-title inherit their `scale` and `position` from tabs parent. | ||
|
||
Elijbet marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```html | ||
<calcite-tab-nav scale="l" position="bottom"> | ||
<calcite-tab-title>Layers</calcite-tab-title> | ||
<calcite-tab-title>Maps</calcite-tab-title> | ||
<calcite-tab-title selected>Data</calcite-tab-title> | ||
</calcite-tab-nav> | ||
<calcite-tabs scale="l" position="bottom"> | ||
<calcite-tab-nav> | ||
<calcite-tab-title>Layers</calcite-tab-title> | ||
<calcite-tab-title>Maps</calcite-tab-title> | ||
<calcite-tab-title selected>Data</calcite-tab-title> | ||
</calcite-tab-nav> | ||
</calcite-tabs> | ||
``` |
14 changes: 0 additions & 14 deletions
14
packages/calcite-components/src/components/tab-title/resources.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
Sidebar: If standalone
tab-nav
usage wasn't supported 1.0.3, let's see if we can remove this and any other doc that might indicate otherwise. cc @geospatialem