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

feat(design): create DaffOpenableDirective #2908

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

xelaint
Copy link
Member

@xelaint xelaint commented Jul 12, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Part of: #763

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@xelaint xelaint added package: design @daffodil/design status: awaiting review This PR is awaiting review labels Jul 12, 2024
@xelaint xelaint added this to the Daffodil v1.0 milestone Jul 12, 2024
@xelaint xelaint requested a review from a team as a code owner July 12, 2024 16:54
@xelaint xelaint changed the title feat(design): create DaffOpenable` interface feat(design): create DaffOpenable interface Jul 12, 2024
@xelaint xelaint marked this pull request as draft July 12, 2024 19:17
@xelaint xelaint added status: wip This PR is WIP. It should be marked as a draft. and removed status: awaiting review This PR is awaiting review labels Jul 16, 2024
@xelaint xelaint self-assigned this Jul 16, 2024
@xelaint xelaint added status: awaiting review This PR is awaiting review and removed status: wip This PR is WIP. It should be marked as a draft. labels Jul 16, 2024
@xelaint xelaint marked this pull request as ready for review July 16, 2024 17:43
@xelaint xelaint assigned damienwebdev and unassigned xelaint Jul 16, 2024
@xelaint
Copy link
Member Author

xelaint commented Jul 16, 2024

@damienwebdev Need to finalize what the output naming is for the openable directive. Are we sticking to toggled?

@xelaint xelaint changed the title feat(design): create DaffOpenable interface feat(design): create DaffOpenableDirective Jul 24, 2024
@xelaint
Copy link
Member Author

xelaint commented Aug 27, 2024

@griest024 we made some updates according to your concerns. lmk what you think.

hide: () => void;

/** Sets toggle on the component */
/** Toggles the component from open to not open */
Copy link
Member

Choose a reason for hiding this comment

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

This will also work in reverse from not open to open, correct? The comment should reflect that converse behavior.

/** Whether or not a component implementing the directive is open */
@Input() @HostBinding('class.daff-open') open = false;

private _setOpen(v: boolean) {
if(!this.stateless) {
this.open = v;
Copy link
Member

Choose a reason for hiding this comment

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

this should be mutating this._open not this.open. The setter for this.open contains the opposite check for stateless so this will never do anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: design @daffodil/design status: awaiting review This PR is awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants