Skip to content

feat: add NcLockIndicator and NcLockedBanner components - #9145

Open
remko48 wants to merge 6 commits into
mainfrom
feat/9126/nc-lock
Open

remko48 wants to merge 6 commits into
mainfrom
feat/9126/nc-lock

Conversation

@remko48

@remko48 remko48 commented Oct 30, 2026

Copy link
Copy Markdown

☑️ Resolves

Note:

  • Both components only show the lock. Locking and unlocking stay in the app.

🖼️ Screenshots

00-page-01 00-page-01

🏁 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

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Styleguidist caches a stylesheet by component name, and the Markdown table and the props table are both called TableRenderer. Whichever rendered first in a session styled both, so after a page with a table in its documentation every props, events and slots table lost its padding, borders and column widths. The Markdown table now renders under its own name with the same styles.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
Renders a padlock that says an item is locked, for example in a list, a table row or a card. Its tooltip and accessible name say who holds the lock; a lock someone else holds is shown in the warning color and a lock the current user holds in a neutral one. show-label adds a short word next to the padlock.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
Renders a banner that says an item is locked and by whom, in the look of NcNoteCard: an error for a lock someone else holds, and a neutral note with an Unlock button for a lock the current user holds. The button emits unlock; unlocking disables it while the lock is released. With expires-at the banner says when the lock expires, as a relative time that updates by itself.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
…pdates

The whole banner was a live region with the self-updating expiry line inside it, so a screen reader read the banner again every minute, and every second in the last two minutes. Only the message of someone else's lock is an alert now, and a lock the current user holds is a note. The unlock button keeps the keyboard focus while unlocking, ignores clicks then, and its loading icon is named. The expiry also takes an ISO date string, only updates when there is an expiry, and translators learn what {time} is. Adds tests for the expiry as time passes, a renewed lock and the loading icon.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
Who holds the lock was only visible in a title tooltip, which keyboard and touch users cannot reach, and show-label only added the word "Locked". show-label now shows the full label, such as "Locked by Jane Doe", as the visible accessible name. Without it, the docs say to show who holds the lock elsewhere. The warning color no longer reads --color-text-warning, which only exists in the dark high-contrast theme.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
…else's lock

The expiry line used --color-text-maxcontrast on the error background, which gives 3.71:1 before Nextcloud 32 and 4.53:1 after, against the 4.5:1 that text needs. On the banner for a lock someone else holds it now takes the text color of the banner; on the user's own lock it stays grey, at 4.89:1 or more.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Remko <remko@conduction.nl>
@remko48 remko48 added the enhancement New feature or request label Oct 30, 2026
@remko48
remko48 requested a review from a team as a code owner October 30, 2026 13:12
@remko48 remko48 added 3. to review Waiting for reviews component Component discussion and/or suggestion labels Oct 30, 2026
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.55%. Comparing base (44c25ae) to head (d6bc943).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9145      +/-   ##
==========================================
+ Coverage   59.11%   59.55%   +0.44%     
==========================================
  Files         125      127       +2     
  Lines        4520     4567      +47     
  Branches     1347     1370      +23     
==========================================
+ Hits         2672     2720      +48     
+ Misses       1570     1569       -1     
  Partials      278      278              

☔ View full report in Codecov by Harness.
📢 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.

@Antreesy

Copy link
Copy Markdown
Contributor

do we still need that notorius first commit? =)

wasn't it used by new CSS variables before? Maybe we can still merge it as a separate bugfix?

This branch has not been deployed

No deployments
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 component Component discussion and/or suggestion enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants