Skip to content

Review Words page refactoring#974

Merged
mircealungu merged 25 commits intomasterfrom
review-words-redisign
Mar 31, 2026
Merged

Review Words page refactoring#974
mircealungu merged 25 commits intomasterfrom
review-words-redisign

Conversation

@AnnieeBennie
Copy link
Copy Markdown
Collaborator

  • changed the layout
  • added more info buttons and explanation pop-ups for them
  • adjusted colors to also work in a dark mode
  • changed the wording of the infoboxes and infobox icon

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 18, 2026

Deploy Preview for voluble-nougat-015dd1 ready!

Name Link
🔨 Latest commit de99e96
🔍 Latest deploy log https://app.netlify.com/projects/voluble-nougat-015dd1/deploys/69cbae3f0166a700099eeef6
😎 Deploy Preview https://deploy-preview-974--voluble-nougat-015dd1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@AnnieeBennie
Copy link
Copy Markdown
Collaborator Author

Hi @mircealungu, I think I finished the refactoring of the Review Words page. I tested it on both iphone and android emulators, and it worked well. I also changed colors a bit. I think if we add those colors we talked about, we can also add some of them here (so I added that light purple for a button and Info icon). What do you think?

Copy link
Copy Markdown
Member

@mircealungu mircealungu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few change requests for you @AnnieeBennie

Comment thread src/components/MoreInfoBox.js Outdated
},
wontBeInExercises: {
mainInfo: "Phrases composed of 3 or more words are not used in the exercises.",
extraInfo: "You can still find them in Words or History tab.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe make the Words a link?

Comment thread src/components/Infobox.js Outdated
return (
<s.Infobox>
<img src={APP_DOMAIN + "/static/icons/info-icon.png"} alt="" />
<img src={infoIcon} alt="" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a reason for this:

  1. The browser extension -- When the web app runs inside the extension, window.location.origin is a chrome-extension:// URL, not zeeguu.org. So
    static assets referenced as /static/icons/... wouldn't resolve. The fallback on line 17 catches this: if the origin doesn't match an expected
    domain (zeeguu.org, netlify.app, localhost), it forces APP_DOMAIN to https://www.zeeguu.org, so image URLs like APP_DOMAIN +
    "/static/icons/info-icon.png" point to the actual server.

how can we solve this?

Comment thread src/components/ColumnWidth.sc.js Outdated
flex-direction: row;
align-items: center;
margin: 1em;
margin: 0.5em;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this important? does 0.5em it make a difference in some situation

Comment thread src/words/WordsToReview.js Outdated
{!exercisesEnabled ? (
<Tooltip title="You need to translate words in the article first." arrow>
<span>
<StyledButton disabled style={{ backgroundColor: "#AAB1DE", color: "white" }}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to make this dark-mode friendly

Comment thread src/words/WordsToReview.js Outdated
</span>
</Tooltip>
) : (
<StyledButton navigation onClick={toExercises} style={{ backgroundColor: "#AAB1DE", color: "white" }}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

<WordsForArticleContainer>
<LeftContent>
<BackArrow />
<WordsToReview
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WordsToReview never uses the screenWidth. Maybe we can avoid passing it then?

history.push(`/exercises/}`);
};

function logGoingToExercisesAfterReview(e) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is never called. we should either call it or remove it.

Comment thread src/words/WordsToReview.js Outdated
<WordsListColumn>
<h3
style={{
display: "flex",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we define this as a separate style? or reuse an existing style?

Comment thread src/components/Infobox.js Outdated
@@ -1,10 +1,10 @@
import * as s from "./Infobox.sc";
import { APP_DOMAIN } from "../appConstants";
import infoIcon from "/static/icons/info-info-icon.png";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it info-info? :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just use the MUI InfoOutlined icon since the project already imports from @mui/material. Something like that:

  import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";                                                                                   
                  
  // in the styled-components file:                                                                                                                  
  const StyledInfoIcon = styled(InfoOutlinedIcon)`
    cursor: pointer;                                                                                                                                 
    flex-shrink: 0;                                                                                                   
    color: var(--text-secondary);
    font-size: 22px;
  `;                                                                                                                                                 

This eliminates both PNG files, both CSS variables (--more-info-icon), and works automatically in any theme. MUI is already a dependency so there's zero cost.

@AnnieeBennie
Copy link
Copy Markdown
Collaborator Author

@mircealungu I fixed acc to your comments, also I added dark mode styles for buttons

AnnieeBennie added 2 commits March 25, 2026 11:06
+ now it shows the ZeeguuSelectedWords infobox correctly
+ it always shows the list of words that won't appear in exercises
@AnnieeBennie
Copy link
Copy Markdown
Collaborator Author

@mircealungu I deleted those infoboxes, and now we have only two of them. One is shown always when the user translates some words, and one in case no words were translated but they somehow open this page

@mircealungu
Copy link
Copy Markdown
Member

@AnnieeBennie - what's the situation with this? are the changes we discussed yesterday implemented?

@AnnieeBennie
Copy link
Copy Markdown
Collaborator Author

@mircealungu yes, I changed the infoboxes we had. So now this one with a toggle shows up if a user translates at least 1 word.
image
Also I fixed that bug that hid the other word list if the infobox was on a screen.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mircealungu
Copy link
Copy Markdown
Member

@AnnieeBennie I've played a bit more with the text on this page. Now it looks like this:

image

There is still something off with this though. For one, the Info icon, we don't really have such great info in there. The more important "info" is in the (?) popup rather. I wonder, if we could swap the two somehow. Have the (?) near "Manage words"... and have the Infobox be "How words are added to exercsies?" and then put the main explanation there.

Moved spaced repetition explanation into info box, removed (?) from
"Will appear in exercises" header, removed unused variables/imports,
simplified redundant condition, removed debug console.log.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mircealungu
Copy link
Copy Markdown
Member

Ah! I was trying to see how it looks, and I committed by mistake to this branch. This is how it looks. What do you think @AnnieeBennie ?

image

@AnnieeBennie
Copy link
Copy Markdown
Collaborator Author

I think now it looks good!
But I'm not sure about its size on mobile phones, this infobox takes half of the screen and it will be there every time a user opens this page, I think it will be unnecessary after they read it. Maybe we can make it open only the first time when a user visits this page like onboarding and then make it collapsible (only leave the toggle to be there all the time)? What do you think?
image

@AnnieeBennie
Copy link
Copy Markdown
Collaborator Author

image These are my ideas, I think the first one is the cleanest one. We can show the infobox on the first visit and then move it into the question icon. Or in the other two screenshots, we can also show the infobox on the first visit and after make it like a link and open it when users tap on it, what do you think?

@mircealungu
Copy link
Copy Markdown
Member

mircealungu commented Mar 29, 2026

I love the simplicity of the first one! And the explanation inside of the (?). We can surely "show the infobox on the first visit and then move it into the question icon". But that is a bit of extra code. Even the version with only the details on demand is great. And maybe the first header could be: "Will eventually appear in exercises". To make it clear that it's not straight away. (We could even put the (?) after eventually?)

@AnnieeBennie
Copy link
Copy Markdown
Collaborator Author

Yes, let’s do that! I’ll tag you when it’s done

+ moved the infobox text into the moreInfoBox
+created a toggleContainer instead of using infobox for the toggle
@AnnieeBennie
Copy link
Copy Markdown
Collaborator Author

@mircealungu done.
I tried to put the infoicon after the "eventually" but it split the text and looked like in the screenshot, so I left it at the end of the line. What do you think?
image

@mircealungu
Copy link
Copy Markdown
Member

@AnnieeBennie - yes, it's strange in the middle. at hte end is best!

@mircealungu
Copy link
Copy Markdown
Member

The current solution is so much cleaner and nicer! Thanks @AnnieeBennie . I'll merge!

@mircealungu mircealungu merged commit d07a549 into master Mar 31, 2026
4 checks passed
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.

2 participants