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: Use boolean props with default value false #6452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jan 23, 2025

☑️ Resolves

Provide disableSwipe instead of allowSwipeNavigation (NcAppContent) and enableSwipe (NcModal).

Boolean prop should always - when possible - have a default value of false to allow shorthand prop assignment in the template. Similar to native HTML boolean attributes:

<!-- native HTML -->
<button disabled>
<!-- boolean Vue prop with default false -->
<NcModal disable-swipe>

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

@susnux susnux added 3. to review Waiting for reviews refactor ♻️ Pull request that is neither a fix nor a feature labels Jan 23, 2025
@susnux susnux added this to the 8.23.0 milestone Jan 23, 2025
@susnux
Copy link
Contributor Author

susnux commented Jan 23, 2025

/backport to next

Provide `disableSwipe` instead of `allowSwipeNavigation`
(`NcAppContent`) and `enableSwipe` (`NcModal`).

Boolean prop should always - when possible - have a default value of
`false` to allow shorthand prop assignment in the template.
Similar to native HTML boolean attributes:

```vue
<!-- native HTML -->
<button disabled>
<!-- boolean Vue prop with default false -->
<NcModal disable-swipe>
```

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the refactor/boolean-props-1 branch from 852c87e to b76ed2a Compare January 23, 2025 22:19
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 backport-request refactor ♻️ Pull request that is neither a fix nor a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants