Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

The find and replace input strings of the FindReplaceOverlay are temporarily colored red to indicate failures of find or replace operations, such as no matches being found for the input string or regular expressions being invalid. The behavior is currently inconsistent and partly unexpected. For example:

  • The field to be colored is selected by the one having focus rather than the one conforming to the current operation; so a failing replace operation will color the search input field if that one has focus
  • Whenever the replace input field shall be colored, the search input field is also colored
  • When a find operation following a successful replace fails (because there are not more matches), the replace field is erroneously colored

With this change, the error feedback via coloring the find and replace input strings is streamlined based on the two following goals:

  • Only one of the input fields is colored at one point in time
  • Which of the fields is colored depends on whether a find or a replace operation failed
  • The coloring is cleared iff either any of the two input fields loses focus or another find/replace operation was performed

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Test Results

 1 818 files  ±0   1 818 suites  ±0   1h 41m 17s ⏱️ + 9m 16s
 7 733 tests ±0   7 505 ✅ ±0  228 💤 ±0  0 ❌ ±0 
24 360 runs  ±0  23 611 ✅ ±0  749 💤 ±0  0 ❌ ±0 

Results for commit 2524500. ± Comparison against base commit 8681223.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review January 7, 2025 16:10
@HeikoKlare HeikoKlare force-pushed the findreplaceoverlay-error-coloring branch 4 times, most recently from 01e670c to 5ee597a Compare January 12, 2025 17:09
The find and replace input strings of the FindReplaceOverlay are
temporarily colored red to indicate failures of find or replace
operations, such as no matches being found for the input string or
regular expressions being invalid. The behavior is currently
inconsistent and partly unexpected. For example:
- The field to be colored is selected by the one having focus rather
than the one conforming to the current operation; so a failing replace
operation will color the search input field if that one has focus
- Whenever the replace input field shall be colored, the search input
field is also colored
- When a find operation following a successful replace fails (because
there are not more matches), the replace field is erroneously colored

With this change, the error feedback via coloring the find and replace
input strings is streamlined based on the two following goals:
- Only one of the input fields is colored at one point in time
- Which of the fields is colored depends on whether a find or a replace
operation failed
- The coloring is cleared iff either any of the two input fields loses
focus or another find/replace operation was performed
@HeikoKlare HeikoKlare force-pushed the findreplaceoverlay-error-coloring branch from 5ee597a to 2524500 Compare January 13, 2025 12:00
@HeikoKlare HeikoKlare merged commit f9feca4 into eclipse-platform:master Jan 13, 2025
17 checks passed
@HeikoKlare HeikoKlare deleted the findreplaceoverlay-error-coloring branch January 13, 2025 15:56
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.

1 participant