Skip to content

serval-admin: serval-builds: highlight and reset non-default date range#3951

Merged
marksvc merged 3 commits into
masterfrom
task/sb-date-url
Jun 17, 2026
Merged

serval-admin: serval-builds: highlight and reset non-default date range#3951
marksvc merged 3 commits into
masterfrom
task/sb-date-url

Conversation

@marksvc

@marksvc marksvc commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

When the user visits the Serval Builds tab, they are shown a default
date range. If the user adjusts the date range, highlight the control
and show a reset button to set the default range back to the initial
default value. This is similar in behaviour to the Search control
(regarding highlighting and resetting/clearing).

Screenshot of date range picker when the default date range is being used:
Screenshot_20260615_143314

Screenshot of date range picker when the date range is changed:
Screenshot_20260615_143353


Open in Devin Review


This change is Reviewable

@marksvc marksvc requested a review from Copilot June 15, 2026 21:22
@marksvc marksvc added the e2e Run e2e tests for this pull request label Jun 15, 2026
@marksvc marksvc marked this pull request as draft June 15, 2026 21:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Serval Builds date range control so that when a user changes away from the initial default range, the control is visually highlighted and a reset button appears to restore the original default date range (matching the existing “Search” control behavior).

Changes:

  • Enables reset/highlight behavior for the Serval Builds date range picker via a new showReset input.
  • Tracks the initial default date range and detects when the current selection differs.
  • Adds UI (reset suffix button) and styling to highlight the date range control when non-default.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-builds.component.html Enables reset/highlight behavior on the date range picker in Serval Builds.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/date-range-picker.component.ts Adds showReset, tracks default vs current range, and implements reset logic.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/date-range-picker.component.html Adds conditional reset button and active-state class binding.
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/date-range-picker.component.scss Styles reset button and applies highlighted form-field styling when active.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

});
}

protected resetToDefaultDateRange(): void {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think this comment is mistaken.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.87%. Comparing base (f3ccad1) to head (7a72ff3).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rval-administration/date-range-picker.component.ts 40.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3951      +/-   ##
==========================================
- Coverage   80.88%   80.87%   -0.01%     
==========================================
  Files         634      634              
  Lines       41019    41029      +10     
  Branches     6674     6683       +9     
==========================================
+ Hits        33180    33184       +4     
- Misses       6789     6795       +6     
  Partials     1050     1050              

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

@marksvc marksvc marked this pull request as ready for review June 15, 2026 21:39
@pmachapman pmachapman self-assigned this Jun 16, 2026
@pmachapman pmachapman self-requested a review June 16, 2026 19:55
@pmachapman pmachapman temporarily deployed to screenshot_diff June 16, 2026 19:59 — with GitHub Actions Inactive

@pmachapman pmachapman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@pmachapman reviewed 4 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on marksvc and pmachapman).


src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/date-range-picker.component.html line 8 at r1 (raw file):

  </mat-date-range-input>
  @if (showReset && !isDefaultRange) {
    <button

Can you please make this look and act like the calendar button next to it? (it is black on light theme, and has no hover effect)

I was able to do this by adding matIconButton here, and adding MatIconButton to the imports in the .ts file.

Code quote:

   <button

marksvc added 2 commits June 17, 2026 10:37
When the user visits the Serval Builds tab, they are shown a default
date range. If the user adjusts the date range, highlight the control
and show a reset button to set the default range back to the initial
default value. This is similar in behaviour to the Search control
(regarding highlighting and resetting/clearing).
@marksvc marksvc force-pushed the task/sb-date-url branch from c5b4c22 to 5ec3e37 Compare June 17, 2026 16:37

@marksvc marksvc left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@marksvc made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on pmachapman).


src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/date-range-picker.component.html line 8 at r1 (raw file):

Previously, pmachapman (Peter Chapman) wrote…

Can you please make this look and act like the calendar button next to it? (it is black on light theme, and has no hover effect)

I was able to do this by adding matIconButton here, and adding MatIconButton to the imports in the .ts file.

Thank you for pointing this out! I changed it and now it behaves like the close button in the Search control.

@pmachapman pmachapman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:lgtm: Excellent, thank you!

@pmachapman reviewed 3 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on marksvc).

@marksvc marksvc enabled auto-merge (squash) June 17, 2026 20:27
@marksvc marksvc temporarily deployed to screenshot_diff June 17, 2026 20:34 — with GitHub Actions Inactive
@marksvc marksvc merged commit 802f9c7 into master Jun 17, 2026
25 of 26 checks passed
@marksvc marksvc deleted the task/sb-date-url branch June 17, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run e2e tests for this pull request testing not required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants