Repository navigation
Translate view: don't try to log UX action for unauthenticated users - #3946
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
|
I tried to use the data already available in the frontend instead of adding info to the Django template. Just in case, I kept the changes in a separate commit, so it's easy to revert 9f6564b Worth noting that I'm very much hand waving when writing JavaScript, and even more so when writing tests (asked ChatGPT to write one based on test cases). P.S. this seems to add an additional call to |
|
I think I'm in React/Redux hell. I tried moving the authentication state as a parameter of the existing function, but that required adding it to all props, update calls, tests, etc. This is how far I manage to go. It works, I'm not sure how correct it is in terms of model (e.g. separation). |
|
I seem to have introduced a bug for "unread notifications", where this action is sent multiple times. |
eemeli
left a comment
There was a problem hiding this comment.
I'm pretty sure that all but the getEntities/EntitiesList changes can be left out of this PR, as they're in code that's never reached when not authenticated. See my inline comment in translate/src/modules/entities/actions.ts for what I think ought to be done instead.
Co-authored-by: Eemeli Aro <eemeli@gmail.com>
|
Sorry for the churn with this. While trying to update the tests, I realized that we log on I believe that behavior is incorrect: we want to measure the options used when searching, it's not useful to know if the user scrolls through the same results. I moved the log to the loading of the component, and updated tests (hopefully correctly this time 🤦🏼). |
|
Side note: while the tests were bad, I've been testing the code authenticated and not authenticated in my local docker installation. |
eemeli
left a comment
There was a problem hiding this comment.
This looks pretty good, and likely fixes the scrolling issue as well.
Fixes #3900
Not sure if there's a better way to do it.