-
-
Notifications
You must be signed in to change notification settings - Fork 0
Let Tab write a suggestion and open the list on typing, not on caret moves #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,6 @@ public sealed class Says : Observable | |
| private string _status = Texts.Of("gui.status.reading"); | ||
|
|
||
| private string _queryProblem = string.Empty; | ||
| private bool _asking; | ||
| private string _refusal = string.Empty; | ||
| private string _layout = string.Empty; | ||
| private string _done = string.Empty; | ||
|
|
@@ -129,40 +128,30 @@ private void Admit(Admitted admitted) | |
| public string QueryProblem => _queryProblem; | ||
|
|
||
| /// <summary> | ||
| /// The line under the search box: what is wrong with the query, or else what the answer to it | ||
| /// has to admit. | ||
| /// What the search field says about its query: what is wrong with it, or else what the answer | ||
| /// to it has to admit. Since 2026-09-25 in a short form at the field's right end and in full in | ||
| /// the panel under it - it stood in a line of its own under the box until then. | ||
| /// | ||
| /// <b>One line rather than two, and the mistake wins</b> - a query that does not read has no | ||
| /// <b>One sentence rather than two, and the mistake wins</b> - a query that does not read has no | ||
| /// answer of its own to qualify, and the list under it is the previous one. | ||
| /// | ||
| /// <b>It still speaks with the box empty, and that is rule 8.</b> A column on screen asks for a | ||
| /// family too (MainViewModel.Asked), so a shown Memory column gets a note here while the window | ||
| /// reads what fills it - or the window reads for seconds with no sentence about it. | ||
| /// </summary> | ||
| public string AnswerLine => _queryProblem.Length > 0 ? _queryProblem : _admitted.Reservations; | ||
|
|
||
| /// <summary>Whether <see cref="AnswerLine"/> is a mistake - what colours it.</summary> | ||
| public bool AnswerLineIsProblem => _queryProblem.Length > 0; | ||
|
|
||
| /// <summary> | ||
| /// Whether the line under the box takes any room: while there is text in the box, or while | ||
| /// the line has something to say. | ||
| /// | ||
| /// <b>Not always, because the window's chrome already takes nearly half its height</b> | ||
| /// (UX-GUI-007). <b>Not only while it has words, because then the list would jump</b> each time a | ||
| /// reading note came and went under somebody's typing. Tied to the box instead, the line appears | ||
| /// with the first character and goes when the box is emptied - a move the person made. | ||
| /// | ||
| /// <b>UNLESS IT STILL HAS SOMETHING TO SAY, and that half is rule 8 rather than layout.</b> A | ||
| /// column on screen asks for a family too (MainViewModel.Asked), so with the box empty a shown | ||
| /// Memory column still gets a note while the window reads what fills it. The reservations no | ||
| /// longer stand under the list, so without this half that note would be said nowhere - the | ||
| /// window reading for seconds with no sentence about it. The review of PR #11 caught the user | ||
| /// changelog promising only the first half. | ||
| /// </summary> | ||
| public bool AnswerLineShown => _asking || AnswerLine.Length > 0; | ||
| // AnswerLineShown and the flag behind it went on 2026-09-25 (backlog 461): they said whether | ||
| // a line under the box took room, and that line went with the palette the same day, when the | ||
| // sentence moved into the field so that typing no longer moves the window. | ||
|
Comment on lines
+147
to
+149
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
git show HEAD^:src/Bws.Gui/ViewModels/Says.cs | rg -n -C 4 '\bAnswerLineShown\b'
rg -n -C 3 '\bAnswerLineShown\b' src tests README.md CHANGELOG.md || trueRepository: donislawdev/BetterWindowsServices Length of output: 1533 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- merge-base declaration and type ---'
git show 3fb14572ff07b3cf6fae3937abc8d92bc403ed23:src/Bws.Gui/ViewModels/Says.cs |
rg -n -C 8 '\b(class|record|struct)\s+Says\b|\bAnswerLineShown\b'
echo '--- reviewed-head relevant source ---'
git show 4fb7e74887f9f703bd5580fe925a7d0445f9cc4b:src/Bws.Gui/ViewModels/Says.cs |
rg -n -C 8 '\b(class|record|struct)\s+Says\b|\bAnswerLineShown\b|RaiseTheAnswerLine'
echo '--- all repository references at reviewed head ---'
git grep -n -E '\bAnswerLineShown\b' 4fb7e74887f9f703bd5580fe925a7d0445f9cc4b -- . || true
echo '--- file-level change from the stated merge base ---'
git diff --unified=5 3fb14572ff07b3cf6fae3937abc8d92bc403ed23 4fb7e74887f9f703bd5580fe925a7d0445f9cc4b -- src/Bws.Gui/ViewModels/Says.csRepository: donislawdev/BetterWindowsServices Length of output: 11430 Preserve or explicitly version the
🤖 Prompt for AI AgentsSource: Path instructions |
||
|
|
||
| private void RaiseTheAnswerLine() | ||
| { | ||
| Raise(nameof(AnswerLine)); | ||
| Raise(nameof(AnswerLineIsProblem)); | ||
| Raise(nameof(AnswerLineShown)); | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
@@ -413,35 +402,29 @@ internal void Moved() | |
| } | ||
|
|
||
| /// <summary> | ||
| /// What is wrong with the query in the box, which may be nothing, and whether the box holds | ||
| /// anything at all. Answers whether the sentence changed, so the caller can tell the box | ||
| /// without telling it once a second for nothing. | ||
| /// What is wrong with the query in the box, which may be nothing. Answers whether the sentence | ||
| /// changed, so the caller can tell the box without telling it once a second for nothing. | ||
| /// | ||
| /// <b>The second half of the sentence is written here rather than by the caller</b>, because it | ||
| /// is true of every mistake: the list stays, so it is the previous answer. | ||
| /// </summary> | ||
| internal bool AboutTheQuery(string text, string problem) | ||
| internal bool AboutTheQuery(string problem) | ||
| { | ||
| var sentence = problem.Length == 0 | ||
| ? string.Empty | ||
| : problem + " " + Texts.Of("gui.query.listIsPrevious"); | ||
|
|
||
| var asking = text.Length > 0; | ||
|
|
||
| if (_queryProblem == sentence && _asking == asking) | ||
| if (_queryProblem == sentence) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| var changed = _queryProblem != sentence; | ||
|
|
||
| _queryProblem = sentence; | ||
| _asking = asking; | ||
|
|
||
| Raise(nameof(QueryProblem)); | ||
| RaiseTheAnswerLine(); | ||
|
|
||
| return changed; | ||
| return true; | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.