-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Small text edits & commented out the tract feedback button and FAQ page #15
base: main
Are you sure you want to change the base?
Conversation
thanks @EmmaLiTsai ! Looks like some unit tests are failing -- they are likely screenshot checks, which are probably solved by taking new screenshots, but I don't know exactly how to do that. @Mr0grog updated them for the previous build, and may be able to quickly explain it. I'll tag KK as a reviewer as soon as she joins the repo. |
On the command line, when running tests, use the cd client
npm test -- --updateSnapshot That should leave you with a bunch of changes to files named Then you should be good to go. |
(FWIW, I feel your pain. I’d normally try to avoid setting up snapshot testing so that it breaks on every day copy changes like this. But I don’t know enough about the structure of things in this repo or the history of the tests here — there might be a good reason they did it this way.) |
@EmmaLiTsai are you able to update the snapshots as Rob suggested? If not let me know and I will try. |
update snapshot tests so they match the actual results of the changes made in this branch.
@EmmaLiTsai I had a little ADHD problem this morning & perseverated on this; if you pull my changes ot your local branch you will see that I updated the snapshots. there are some yellow unit tests when I run the translations tests still fail, not sure if that is expected behaviour -- do you know, @Mr0grog ? |
Thanks for updating the snapshots, Matt! I'm at a conference this week in California but looking at this now - I'm wondering if this is a flag that the spanish translation for the updated text is missing for the FAQ page? I commented out the Q&A section of the page in my PR but it seems that change might not have made it to the translated version... |
The error message makes it look like it’s the other way around, but yeah:
It looks like using I wonder why that’s happening. Since the code is just being commented (not removed) I’d think we want to keep the relevant translations. And I wouldn’t have expected |
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.
LGTM
I had some time in front of a keyboard to take a look at this in detail, and if I start with @EmmaLiTsai’s latest commit to run the tests with If so, we can just roll that part back and everything should be good here. |
I will check.
…On Tue, Feb 4, 2025 at 7:53 PM Rob Brackett ***@***.***> wrote:
I had some time in front of a keyboard to take a look at this in detail,
and if I start with @EmmaLiTsai <https://github.com/EmmaLiTsai>’s latest
commit to run the tests with --updateSnapshot, it doesn’t change en.json.
@titaniumbones <https://github.com/titaniumbones>, any change you just
happened to have changes to that file in your local copy — not created by
the test script — and accidentally committed them?
If so, we can just roll that part back and everything should be good here.
—
Reply to this email directly, view it on GitHub
<#15 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACY6NDWPM322AQS2V4TCR32OFOKDAVCNFSM6AAAAABWID3IB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZVGQ3DIMBTGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I can't figure it out but yes it must have been me. Interestingly, the previous commit that touches that file was your I suck at rolling back commits. Are you able to force-push your branch, or whatever? |
Ugh ugh. Wish I had time to build a better sense of what all is happening in this repo.
Yep, will do shortly |
Ohhh what a mess. There is a pre-commit hook that that changes and adds that file to your commit in the middle of committing, when you have no chance to review it. |
OK, I’ve run out of time for this today, but here is what’s going on as I understand it so far:
So… I’m not sure what the state of things is here with translations. Are we keeping the Spanish up to date? If yes:
If no, maybe we just turn this whole thing off. The Spanish translation file will get a little cruddier over time, but if we are not keeping the Spanish up-to-date, that’s just what you get. BUT I or someone probably needs to do some checking to make sure the Spanish view doesn’t just break entirely with errors if strings are missing from the Spanish file. |
Hi @Mr0grog! Circling back here after touching base briefly with @titaniumbones. What do you think about turning the build cilent / translation check off for now? I don't think the larger group has decided how we want to handle the Spanish translation issue, but we can always turn the check back on in the future once we land on a strategy. I haven't had to do this before, but I'm assuming it would just be commenting out lines 104 - 121, and 130 on the |
This allows the translations lint/test step to fail without failing the whole job and thus blocking the build. It also logs some summary info for the workflow so it's possible to keep an eye on the status of translation issues, and helps keep `src/i18n/en.json` up to date (for example, if you committed from the GitHub web UI, where pre-commit hooks don't run).
@EmmaLiTsai That makes sense!
That would work, but I went ahead and did something fancier, under the assumption that one day we’ll want a nicer translation workflow, so we want to at least keep apprised of issues:
|
The special incantation to update snapshots is tough to remember and non-obvious for many folks who are just updating text copy in the app. This makes the CI workflow auto-update snapshot tests on pull requests (not other pushes) where there were changes to the english strings. It's possible this could make tests pass when they shouldn't (if other things that should not have changed were changed), so it also posts a comment to the PR if it had to update the snapshots that reminds a reviewer to check the snapshot changes.
Realized after taking a break that the same approach could be applied to the snapshot tests, so you should not need to remember to run them now if you are making changes to the text. The actions workflows will now:
|
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.
Marking this approved so someone else can just go ahead and merge if these changes are good and help make things easier.
I can also split out the auto-update stuff from this set of changes. Just say the word!
This PR: