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

fix: make datepicker compatible with dialog #680

Merged
merged 25 commits into from
Mar 11, 2021
Merged

Conversation

JoelGraham93
Copy link
Contributor

Requirement for Virtual Receptionist app to use datepicker within dialog. figma

mwc-dialog adds the inert attribute to all elements outside of the modal scope. This prevents interaction.

@github-actions
Copy link

🚀

Latest successful build of the PR deployed here.

🚀

@yinonov
Copy link
Contributor

yinonov commented Feb 28, 2021

Requirement for Virtual Receptionist app to use datepicker within dialog. figma

mwc-dialog adds the inert attribute to all elements outside of the modal scope. This prevents interaction.

does it add inert to inner content of dialog as well?

@JoelGraham93
Copy link
Contributor Author

Requirement for Virtual Receptionist app to use datepicker within dialog. figma
mwc-dialog adds the inert attribute to all elements outside of the modal scope. This prevents interaction.

does it add inert to inner content of dialog as well?

No only outside of vwc-dialog scope.
vwc-datepicker doesn't receive inert but the html datepicker is appended to the body so this receives inert.

Comment on lines 1 to 8
"lit-flatpickr",
"@vonage/vvd-core",
"@vonage/vwc-datepicker",
"@vonage/vwc-textfield",
"@vonage/vwc-dialog",
"@open-wc/*"
]
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we ignoring dependencies anyway?

@@ -0,0 +1,798 @@
// copy paste from flatpicker/dist/flatpickr.css
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the flatpicker library original css? if so, can we just import it to our style (vwc-datepicker.scss)?
https://sass-lang.com/documentation/at-rules/import#importing-css

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it's the original css.
css imports don't appear to be working in our css module setup.
I read on the polymer slack channel that the mwc team had a build process which converts their .css files to .css.ts and wraps it in a css template literal export const style = css '...'

Copy link
Contributor

Choose a reason for hiding this comment

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

that's exactly what we're doing
I changed the code to reflect what I suggested so that it will proxy the original css code
hope that's ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yea nice that works. I tried @import initially which wasn't working with the .css file

@sonarcloud
Copy link

sonarcloud bot commented Mar 11, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@yinonov yinonov merged commit 4d31499 into master Mar 11, 2021
@gullerya gullerya deleted the dialog-datepicker branch March 17, 2021 19:17
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.

None yet

2 participants