Skip to content

improved layout of verification modal#950

Open
jenniferhmartinezmejia-netizen wants to merge 3 commits into
project-robius:mainfrom
jenniferhmartinezmejia-netizen:fix-issue-846
Open

improved layout of verification modal#950
jenniferhmartinezmejia-netizen wants to merge 3 commits into
project-robius:mainfrom
jenniferhmartinezmejia-netizen:fix-issue-846

Conversation

@jenniferhmartinezmejia-netizen

@jenniferhmartinezmejia-netizen jenniferhmartinezmejia-netizen commented Jun 27, 2026

Copy link
Copy Markdown

Note: a PR template is required for the CodePath class I am taking. I couldn't find a template in the repo so I used the one provided in the class.

What does this PR do?

Replaces the plain text list of SAS verification emojis in the verification modal with a right-wrapping grid of cells, each displaying a large emoji glyph above its description.

Why was this PR needed?

Users reported the emojis were too small to compare against another device. The root cause was that all seven emojis were concatenated into a single ModalBody label at body-text size (11.5pt), with no per-emoji layout. Now that Makepad supports well-aligned right-wrap flow layouts, each emoji can be rendered as an independent cell at a larger size. See #846.

What are the relevant issue numbers?

Closes #846

Screenshots

image image

Does this PR meet the acceptance criteria?

Project builds and tested locally, (screenshots above). Used Claude to review code, manually reviewed each line.

@kevinaboos kevinaboos left a comment

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.

Hi @jenniferhmartinezmejia-netizen, thanks for your contribution!

I left some comments below. While things generally look fine, I get the sense that you basically just copy-pasted Element's design decisions into Robrix. Please don't just directly copy Element; we're not trying to make an Element clone here, and I don't want to get accused of IP theft.

The only thing we need to actually change here in Robrix is the emoji layout. Nothing else -- the button order, messages shown in the modal body, text phrasing, etc doesn't need to change.

Please disclose what AI Agents or LLMs you used to generate this PR, and whether you manually reviewed each line. If not, please do so as part of your next commit.

Comment thread src/verification_modal.rs Outdated
Comment thread src/verification_modal.rs
Comment thread src/verification_modal.rs Outdated
Comment thread src/verification_modal.rs Outdated
@jenniferhmartinezmejia-netizen

Copy link
Copy Markdown
Author

Hey Kevin! Thank you for reviewing the changes closely. I will make sure to review the comments and make the changes later this week when I have time. I didn't mean to copy Element, apologies for that. I was just trying to follow the comments made by matlu on the issue. That's my bad for not double-checking if you wanted those changes or not. Have a nice rest of your day!

@kevinaboos

Copy link
Copy Markdown
Member

all good, thanks!

@kevinaboos kevinaboos left a comment

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.

thanks for addressing most of the issues I raised. Code is generally looking good, but I left a few more questions for new things that I noticed.

Comment thread src/verification_modal.rs
Comment on lines +158 to +160
// The emoji grid is only relevant during the `KeysExchanged` emoji
// step; hide it by default and let that branch re-show it, so it
// never leaks into other states.

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.

please don't use LLM-style comments. This can be really simple.

Suggested change
// The emoji grid is only relevant during the `KeysExchanged` emoji
// step; hide it by default and let that branch re-show it, so it
// never leaks into other states.
// The emoji grid is hidden by default and only shown during emoji verification.

Comment thread src/verification_modal.rs
);
for (index, emoji) in emoji_list.emojis.iter().enumerate() {
self.populate_emoji_cell(cx, index, emoji.symbol, emoji.description);
}

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 better than the previous C-style loop that you had before, but we can do even better than this with Rust. Check out the .zip() iterator function, which will let you iterate over the emoji list and the set of emoji cells in lockstep, which itself will let you avoid the match index { ... } block in populate_emoji_cell().

Once you see how that works, you'll recognize that you can also easily move the body of populate_emoji_cell() (which is really just the two lines that set the symbol and description labels) directly into this code block.

Comment thread src/verification_modal.rs
Comment on lines +366 to +367
// Ensure the emoji grid from any prior verification is not shown
// on the initial prompt screen.

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.

again, LLM comments like this aren't necessary, you can just delete it entirely. Good comments explain a design choice or why we're doing something complex that is non-obvious, but here it is very obvious what's happening.

Suggested change
// Ensure the emoji grid from any prior verification is not shown
// on the initial prompt screen.

Comment thread src/verification_modal.rs
}
}
description := Label {
width: Fit{max: FitBound.Abs(72.0)}, height: Fit

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.

hmm, i don't quite understand this width choice. Can you explain why we need a max width here? Seems like for something like this we would want both the symbol and the description to have a fixed width (perhaps 72 as you used for the max width here).

I can't think of a scenario where we'd need a width that is Fit but expands to a max of 72. But let me know if i'm overlooking something.

@kevinaboos kevinaboos added the waiting-on-author This issue is waiting on the original author for a response label Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-author This issue is waiting on the original author for a response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve layout of verification modal

2 participants