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(cxl-ui): close drawer by default on mobile #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

anoblet
Copy link
Owner

@anoblet anoblet commented Nov 3, 2021

No description provided.

@github-actions
Copy link

github-actions bot commented Nov 3, 2021

size-limit report 📦

Path Size
packages/cxl-ui/pkg/dist-web/index.bundled.js 99.99 KB (+0.07% 🔺)

super.updated(changedProperties);

if (changedProperties.has('wide') && !this.wide) {
this.asideOpened = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to still keep track of what the state was on wide, so it returns to such, when toggling between mobile / desktop.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Updated to restore drawer state on media change

}
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we able to do a much simpler ${this.wide && this.asideOpened} conditional upgrade directly on <aside> element template?

Copy link
Owner Author

@anoblet anoblet Nov 3, 2021

Choose a reason for hiding this comment

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

I just tried that. Since wide would always evaluate to false on mobile the drawer doesn't open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants