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

refactor(panel, shell, tree-item): Add keys to conditionally rendered slots. #3962

Merged
merged 8 commits into from
Jan 20, 2022

Conversation

driskull
Copy link
Member

Related Issue: N/A

Summary

refactor(panel, shell, tree-item): Add keys to conditionally rendered slots.

@github-actions github-actions bot added this to the Sprint 01/17 - 01/28 milestone Jan 19, 2022
@github-actions github-actions bot added the refactor Issues tied to code that needs to be significantly reworked. label Jan 19, 2022
@driskull driskull marked this pull request as ready for review January 20, 2022 01:37
@driskull driskull requested a review from a team as a code owner January 20, 2022 01:37
@driskull driskull requested a review from jcfranco January 20, 2022 19:43
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

👍🏼

<div class={CSS.content}>
<slot />
<slot name={SLOTS.centerRow} />
<div class={CSS.content} key={contentContainerKey}>
Copy link
Member

Choose a reason for hiding this comment

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

Before merging, can you confirm that the CSS looks correct when contentBehind is toggled?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks good!

const defaultSlotNode: VNode = <slot key="default-slot" />;
const centerRowSlotNode: VNode = <slot key="center-row-slot" name={SLOTS.centerRow} />;
const contentContainerKey = "content-container";

const content = !!this.contentBehind
? [
<div
class={{
[CSS.content]: true,
[CSS.contentBehind]: !!this.contentBehind
Copy link
Member

Choose a reason for hiding this comment

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

Sidebar/nitpick: this is always true here.

@driskull driskull merged commit 02c4c9f into master Jan 20, 2022
@driskull driskull deleted the dris0000/conditional-default-slot-rendering branch January 20, 2022 20:36
y0n4 pushed a commit that referenced this pull request Jan 24, 2022
… slots. (#3962)

* refactor(panel, shell, tree-item): Add keys to conditionally rendered slots.

* add const for key.

* fix code

* review cleanup
y0n4 pushed a commit that referenced this pull request Jan 27, 2022
* fix(label, input, input-message)!: deprecate and no longer support status prop for calcite-label

* alter tests for status being passed in calcite label

* update the readme for labels using status and add status prop to input/input-message

* add deprecated comment for status prop

* refactor(panel, shell, tree-item): Add keys to conditionally rendered slots. (#3962)

* refactor(panel, shell, tree-item): Add keys to conditionally rendered slots.

* add const for key.

* fix code

* review cleanup

* feat(panel): Add method to scroll content. #3924 (#3960)

* ci(screener): updating to Chrome 97 (#3940)

* 1.0.0-next.373

* docs: update component READMEs (#3972)

Co-authored-by: jcfranco <jcfranco@users.noreply.github.com>

* ci(screener): enlarging screen resolution (#3977)

* refactor(input): fix all types that are any (#3981)

* refactor: Update relevant components to handle slotting after init (#3889)

* refactor: Update relevant components to use ConditionalSlotComponent #3686

* cleanup

* cleanup

* cleanup

* fix links that aren't direct slots

* remove assigned slot check, only get direct children

* fix test

* cleanup

* cleanup

* partial review fixes

* revert changes to combobox and card

* refactor(slider): remove drag event listeners on component disconnected (#3969)

* refactor(slider): remove eventListeners on DOM disconnected

* feedback changes

* add private method for duplicate code

* rename method

* build: update browserslist db (#3985)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* test(input): when both 'ArrowUp' and 'ArrowDown' are pressed at the same time most recently pressed key takes over (#3989)

Co-authored-by: Eliza Khachatryan <eli97736@esri.com>

* alter verbiage of deprecated prop

* ci(screener): restoring pre-Sauce integration settings (#3994)

* docs(template): provide context for the repro samples (#3970)

* docs(templates): provide content for the repro samples

* use cc latest version

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: pin node 16 and npm 8 for volta (#3964)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* docs(readme): remove sketch info until it is up to date (#3996)

* fix(date-picker): update utils locale to get the lang code if regional code is not found (#3968)

* fix(date-picker): update utils locale to get the lang code if regional code is not found

* alter util changes based from pr comments

* 1.0.0-next.374

* ci: allow primary and secondary contacts to merge on all prs (#3999)

* ci: allow primary and secondary contacts to merge on all prs

* cleanup

* use admin token

* fix(date-picker, input-date-picker): update pt-BR and pt-PT localization files (#3980)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat(tree):  multi-selection no longer requires holding shift key (#3733)

* fix(tree): enable multi select with pointer

* save selected items at main level

* fix single selection mode

* deselect siblings when mode is single

* fix deselecting tree item when mode is multi

* fix deselecting with shift keydown

* refactor e2e test

* remove unused imports in e2e

* feedback changes

* emit calciteTreeSelect event without shift key

* refactor code

* add e2e test and feedback changes

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 1.0.0-next.375

* test(dropdown): correct logical errors in the test (#3998)

* test(dropdown): correct logical errors in the test

* assert both events after each toggle action and  use page.waitForEvent before doing assertions

Co-authored-by: Eliza Khachatryan <eli97736@esri.com>

* deprecate and restore the use of status prop

* restore reading status prop from label

Co-authored-by: Matt Driscoll <mdriscoll@esri.com>
Co-authored-by: Erik Harper <eharperdicianno@esri.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben Elan <benelan@users.noreply.github.com>
Co-authored-by: jcfranco <jcfranco@users.noreply.github.com>
Co-authored-by: Anveshreddy mekala <anv11827@esri.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Eliza Khachatryan <elijbet@gmail.com>
Co-authored-by: Eliza Khachatryan <eli97736@esri.com>
Co-authored-by: JC Franco <jfranco@esri.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants