Skip to content

refactor(NcModal): migrate to Typescript and script-setup + feat(useHotKey): add new option allowInModal#7514

Merged
susnux merged 12 commits intomainfrom
refactor/nc-modal-ts
Nov 28, 2025
Merged

refactor(NcModal): migrate to Typescript and script-setup + feat(useHotKey): add new option allowInModal#7514
susnux merged 12 commits intomainfrom
refactor/nc-modal-ts

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Sep 15, 2025

☑️ Resolves

This consists of multiple refactoring as you can review individually with each commit.
Basically this migrates the component to Typescript and then to script-setup with new consistent tag order.
By doing so also removed the last JS util (Timer) and just uses the useIntervalFn from vueuse.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@susnux susnux added this to the 9.0.0 milestone Sep 15, 2025
@susnux susnux added 3. to review Waiting for reviews feature: modal Related to the modal component refactor ♻️ Pull request that is neither a fix nor a feature labels Sep 15, 2025
@susnux susnux force-pushed the refactor/nc-modal-ts branch from a488070 to 09e25d7 Compare September 15, 2025 09:09
@susnux susnux force-pushed the refactor/nc-modal-ts branch from 09e25d7 to 8ad5ebb Compare September 15, 2025 09:20
@Antreesy Antreesy modified the milestones: 9.0.0, 9.0.1 Oct 1, 2025
@susnux susnux modified the milestones: 9.0.1, 9.0.2 Oct 6, 2025
@susnux susnux modified the milestones: 9.0.2, 9.1.0 Oct 14, 2025
@susnux susnux removed the request for review from st3iny November 4, 2025 11:31
@susnux susnux modified the milestones: 9.1.0, 9.2.0 Nov 4, 2025
@susnux susnux force-pushed the refactor/nc-modal-ts branch from 8ad5ebb to d4641da Compare November 7, 2025 17:11
@susnux
Copy link
Contributor Author

susnux commented Nov 7, 2025

(just a rebase for CI)

@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.96%. Comparing base (e69604f) to head (0bdf7ec).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
src/components/NcModal/NcModal.vue 48.00% 39 Missing and 13 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7514      +/-   ##
==========================================
+ Coverage   52.20%   52.96%   +0.76%     
==========================================
  Files         101      100       -1     
  Lines        3174     3119      -55     
  Branches      871      868       -3     
==========================================
- Hits         1657     1652       -5     
+ Misses       1271     1229      -42     
+ Partials      246      238       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@susnux susnux requested a review from ShGKme November 12, 2025 20:38
@ShGKme
Copy link
Contributor

ShGKme commented Nov 12, 2025

I'll check on the morning

@ShGKme ShGKme modified the milestones: 9.2.0, 9.3.0 Nov 14, 2025
Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

Nitpicks only.

Thanks for splitting into commits.

Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Otherwise nice work!

@susnux susnux force-pushed the refactor/nc-modal-ts branch 2 times, most recently from 591f6ca to eb2e092 Compare November 25, 2025 19:38
@susnux
Copy link
Contributor Author

susnux commented Nov 25, 2025

Added commits fixing the review comments

@susnux susnux force-pushed the refactor/nc-modal-ts branch from eb2e092 to 86ad6b0 Compare November 25, 2025 22:38
@susnux susnux requested a review from Antreesy November 25, 2025 22:39
Copy link
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Otherwise fine. Maybe we'll keep native eventListeners for now?

@susnux
Copy link
Contributor Author

susnux commented Nov 26, 2025

@ShGKme @Antreesy please check the new commit (latest)

- Use Typescript for component
- Use vueuse composable instead of custom Timer class

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Instead of dialog example where we recommend to use NcDialog we should
provide an example on how to use the slideshow feature.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1. Script
2. Template
3. Styles
4. Docs

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This allows to also trigger hotkeys in modals.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the refactor/nc-modal-ts branch from e59f163 to 0bdf7ec Compare November 28, 2025 10:26
@susnux
Copy link
Contributor Author

susnux commented Nov 28, 2025

(rebased to check CI)

@susnux susnux merged commit 3f02ce0 into main Nov 28, 2025
26 of 27 checks passed
@susnux susnux deleted the refactor/nc-modal-ts branch November 28, 2025 10:42
@ShGKme ShGKme changed the title refactor(NcModal): migrate to Typescript and script-setup refactor(NcModal): migrate to Typescript and script-setup + feat(useHotKey): add new option allowInModal Nov 28, 2025
@ShGKme ShGKme added the enhancement New feature or request label Nov 28, 2025
@skjnldsv skjnldsv mentioned this pull request Dec 10, 2025
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 enhancement New feature or request feature: modal Related to the modal component refactor ♻️ Pull request that is neither a fix nor a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants