Skip to content

feat: toast timeout configuration - #2539

Open
kristian-zendato wants to merge 1 commit into
mainfrom
feat/timeout-configuration
Open

feat: toast timeout configuration#2539
kristian-zendato wants to merge 1 commit into
mainfrom
feat/timeout-configuration

Conversation

@kristian-zendato

Copy link
Copy Markdown

Summary

Adds configurable timeouts for ordinary toast notifications.

  • Exposes getToastTimeout and setToastTimeout
  • Shares the configured value across bundled library copies via window
  • Preserves fixed behavior for loading, undo, and permanent toasts

🤖 AI (if applicable)

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

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.83%. Comparing base (22d789b) to head (0fb0cb1).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2539       +/-   ##
===========================================
+ Coverage   43.79%   54.83%   +11.03%     
===========================================
  Files          15       15               
  Lines         427      445       +18     
  Branches       82       89        +7     
===========================================
+ Hits          187      244       +57     
+ Misses        211      179       -32     
+ Partials       29       22        -7     

☔ 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.

Signed-off-by: Kristian Zendato <kristian.zendato@nextcloud.com>
@kristian-zendato
kristian-zendato force-pushed the feat/timeout-configuration branch from 368c958 to 0fb0cb1 Compare July 30, 2026 11:40
Comment thread lib/index.ts
Comment on lines +26 to +27
getToastTimeout,
setToastTimeout,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What would be the use case to expose this?
The values are only used internally by the toast implementation?

Comment thread lib/toast.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is only used internally so the value specified on server should be provided in the capabilities of theming and then used in the implementation here

@susnux susnux added enhancement New feature or request 3. to review labels Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants