-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
SF-3028 Add final confirmation step when generating drafts #2787
base: master
Are you sure you want to change the base?
Conversation
Two things Bethany suggested that I think are worth capturing here:
|
Given how condensed the training card can be with the latest changes, I think we should postpone the expand/collapse card til we confirm we need it. |
a4ad7d2
to
04412cc
Compare
This is an improvement, but:
|
fa410bb
to
ef00bad
Compare
Talked with Nathaniel. It appears that the font sizes between the top and bottom are slightly different. I'll look into this. And we do in fact want the bottom books comma separated on one line. |
ef00bad
to
8edfcfd
Compare
ff377e6
to
01b552c
Compare
At the recent UX meeting, we decided to combine the identical training book ranges to a single cell, comma separated, with word/span wrapping that doesn't separate the individual ranges. Edit: with full book names |
01b552c
to
22b6b7f
Compare
After meeting with Nigel, this is looking good. Several things:
enumerateList(list: string[]): string {
return new (Intl as any).ListFormat(this.localeCode, { style: 'long', type: 'conjunction' }).format(list) as string;
} I think we're both happy with it once these changes are included. |
ed18e85
to
91b2744
Compare
<div class="confirm-books cell-padding-block"> | ||
@for (range of element.ranges; track range) { | ||
@if (range !== element.ranges[element.ranges.length - 1]) { | ||
<span class="confirm-book">{{ range }}, </span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be updated to use i18n.enumerateList
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. We do lose out on the word-wrapping control we had previously, however
468d8cc
to
2d898d1
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2787 +/- ##
==========================================
+ Coverage 80.91% 80.93% +0.02%
==========================================
Files 533 533
Lines 31224 31253 +29
Branches 5080 5068 -12
==========================================
+ Hits 25266 25296 +30
- Misses 5198 5207 +9
+ Partials 760 750 -10 ☔ View full report in Codecov by Sentry. |
@Nateowami, it sounds like you're owning the review on this? Or maybe @nigel-wells? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 5 files at r1, 1 of 4 files at r2.
Reviewable status: 2 of 6 files reviewed, 1 unresolved discussion (waiting on @josephmyers)
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.html
line 204 at r3 (raw file):
<td mat-cell *matCellDef="let element" class="bookName"> <div class="confirm-books cell-padding-block"> {{ this.i18n.enumerateList(element.ranges) }}
this.
is not needed, here or below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 6 files reviewed, all discussions resolved (waiting on @Nateowami)
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.html
line 204 at r3 (raw file):
Previously, Nateowami wrote…
this.
is not needed, here or below.
Done
836602a
to
c7c4ce3
Compare
Happy to take a look if needed - @Nateowami has assigned himself though so I've not taken a deep look other than what we spoke about yesterday. |
Switched to a card design. The gray box was too much color, decreased contrast, and just didn't look great. Inserted the titles from Step 1, with the source name added to the second.
Also displaying the display name of the language codes for the training table header (assuming it's retrievable).
And force synced the book font size
I think my previous iteration is more readable, but I'm content if others are fine with it.
This does mean we won't have as much control about word wrapping.
59809fe
to
9dd723f
Compare
…the Summary. I took the opportunity of adding the final step to consider the component at a high level. There were many, many mindless state variables added in over the various tasks each individual had worked on, given that a different person worked on each step. I consolidated all those into a few, smarter variables, using object-oriented design. Notably, all information (including current state) about our translate and training books are wrapped up into two variables. Everything centers around interacting with them, and the other properties in the component are different reflections of these two models. The result is a cleaner and less bug-prone component. Another major benefit of this refactor is that, from this component's perspective, 3+ sources would be quite simple to add in. Simply initialize the new projects into the dictionary-style model made for the training books, and everything else will work. Better yet, refactor the sources input to simply be a list. This model containts the data for both the sources and target, and in some cases the target entry needs to be skipped. You could easily add support for multiple training targets, as well.
This was necessary to be able to mock out the utility method. It will make unit testing much, much easier.
It also abstracts the alternate logic to itself, such that it only publishes the used/relevant sources. And the draft utility method is no longer needed. This slightly changes the warning messages on the draft home page. There's less of a distinction between the normal and alternate source selections, for the warning messages. The source name, however, is still clearly listed, and that's the important part.
- Not adding a book to training targets if that book is absent from all sources. The user should be able to figure this out, but preventing the add will help them. The message for unusable source books is still present. If the book is only missing for the first training source but present for the second, the user will get the "unusable" message and have the book available for the target and second source. - When selecting a translated book, find the first source containing the book and select that book. This is an improvement over my original design, which would only check the first source ever. - Slightly better support for no training sources
This matches the original intent, as evidenced by the first unit test. Also, fixed all the tests for this class.
This change is