Skip to content

feat(settings): add reset to defaults button on settings pages#776

Merged
thostetler merged 3 commits intoadsabs:masterfrom
thostetler:reset-settings-button-1
Jan 28, 2026
Merged

feat(settings): add reset to defaults button on settings pages#776
thostetler merged 3 commits intoadsabs:masterfrom
thostetler:reset-settings-button-1

Conversation

@thostetler
Copy link
Member

@thostetler thostetler commented Jan 21, 2026

Adds a reset to defaults link to the application, export, and libraries settings pages.

  • Reusable ResetSettingsButton component with confirmation dialog
  • SettingsLayout extended with headerAction prop for header placement
  • Subtle gray link style in top-right of settings header
  • Preserves custom export formats (intentionally excluded from reset)
reset_to_defauts-2026-01-27_12.43.10.mp4

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 85.86957% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.2%. Comparing base (e32f10a) to head (89588ea).

Files with missing lines Patch % Lines
src/lib/useSettings.ts 23.6% 13 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #776     +/-   ##
========================================
+ Coverage    61.1%   61.2%   +0.1%     
========================================
  Files         304     305      +1     
  Lines       35318   35378     +60     
  Branches     1534    1533      -1     
========================================
+ Hits        21566   21636     +70     
+ Misses      13716   13706     -10     
  Partials       36      36             
Files with missing lines Coverage Δ
...ttings/ResetSettingsButton/ResetSettingsButton.tsx 100.0% <100.0%> (ø)
src/lib/useSettings.ts 74.7% <23.6%> (+10.7%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thostetler thostetler force-pushed the reset-settings-button-1 branch from 0f63f55 to 0cf0596 Compare January 27, 2026 17:43
@thostetler thostetler requested a review from shinyichen January 27, 2026 17:45
@thostetler thostetler marked this pull request as ready for review January 27, 2026 17:45
Copy link
Member

@shinyichen shinyichen left a comment

Choose a reason for hiding this comment

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

This looks good. I am wondering in the Export Settings, would user expect when clicking on reset, only the current tab is being reset. Maybe something to discuss. Other than that, everything looks good to me.

@thostetler
Copy link
Member Author

This looks good. I am wondering in the Export Settings, would user expect when clicking on reset, only the current tab is being reset. Maybe something to discuss. Other than that, everything looks good to me.

Yep good point, I think it should be easy to make that change, let me give it a shot

- Add ResetSettingsButton component with confirmation dialog
- Extend SettingsLayout with headerAction prop for header-right placement
- Add reset button to application, export, and libraries settings pages
- Include unit tests for component and integration test for page
@thostetler thostetler force-pushed the reset-settings-button-1 branch from 0cf0596 to d088afd Compare January 28, 2026 18:23
The reset-to-defaults button on the export settings page now resets
only the settings for the currently active tab instead of all export
settings. Each tab has its own set of settings keys, and the dialog
text indicates which tab's settings will be reset.
The sample format textarea on the Default Copy Citation Format tab
is for preview only and should not be editable.
@thostetler
Copy link
Member Author

@shinyichen please check out the latest changes when you get a chance

@shinyichen shinyichen self-requested a review January 28, 2026 22:38
@thostetler thostetler merged commit da2dacd into adsabs:master Jan 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants