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(NcModal): Close button should be visible even if modal content is scrolled #4350

Merged
merged 1 commit into from Aug 3, 2023

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jul 18, 2023

☑️ Resolves

Ensures that the close button of the modal is always visible, even if the content overflows the container and is scrolled.

🧪 Cypress test included.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

… scrolled. Fixes #3118

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux added bug Something isn't working 3. to review Waiting for reviews feature: modal Related to the modal component labels Jul 18, 2023
@raimund-schluessler
Copy link
Contributor

@susnux Awesome that you included tests, but Runner2 gives this error:

ERROR in /home/runner/actions-runner/_work/nextcloud-vue/nextcloud-vue/cypress/component/modal.cy.ts
./cypress/component/modal.cy.ts 2:20-62
[tsl] ERROR in /home/runner/actions-runner/_work/nextcloud-vue/nextcloud-vue/cypress/component/modal.cy.ts(2,21)
      TS2307: Cannot find module '../../src/components/NcModal/NcModal.vue' or its corresponding type declarations.

webpack 5.88.2 compiled with 1 error in 18184 ms


  NcModal
    ✓ close button is visible when content is scrolled (102ms)

However, it passes anyway, so I don't know what the error means 🙈

@susnux
Copy link
Contributor Author

susnux commented Jul 22, 2023

However, it passes anyway, so I don't know what the error means see_no_evil

It means Typescript is missing the type definitions for that vue file, as it is written in Javascript and we do not provide any typings for it. I think to silence that issue I will have to add a declaration shim for tests :)

Copy link
Contributor

@st3iny st3iny left a comment

Choose a reason for hiding this comment

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

Tested in calendar and works.

Some hacks need to be reverted and I added a note to #4223.

Exemplary patch for calendar

diff --git a/css/app-settings.scss b/css/app-settings.scss
index 5e96ae0e6..5ae9a0744 100644
--- a/css/app-settings.scss
+++ b/css/app-settings.scss
@@ -86,8 +86,6 @@
 
 .shortcut-overview-modal {
 	.modal-container {
-		display: flex !important;
-		flex-wrap: wrap;
 		padding: 0 12px 12px 12px !important;
 
 		* {

@susnux susnux requested review from ShGKme and skjnldsv and removed request for ShGKme July 26, 2023 19:24
@st3iny st3iny merged commit 959fe1e into master Aug 3, 2023
16 checks passed
@st3iny st3iny deleted the fix/3118-scrolled-modal-should-be-closeable branch August 3, 2023 09:23
@skjnldsv skjnldsv mentioned this pull request Aug 11, 2023
@susnux
Copy link
Contributor Author

susnux commented Aug 11, 2023

/backport to stable7

@Antreesy
Copy link
Contributor

Antreesy commented Oct 9, 2023

After re-ordering of modal-container__close and modal-container__content content can overlap close button, making it inaccessible

Raised an issue 4627 for tracking this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working feature: modal Related to the modal component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrolled modal can't be closed
5 participants