Skip to content

fix: make Home tool cards responsive - #178

Merged
NPFernando merged 1 commit into
mainfrom
hermes/home-responsive-tool-grid
Aug 16, 2026
Merged

fix: make Home tool cards responsive#178
NPFernando merged 1 commit into
mainfrom
hermes/home-responsive-tool-grid

Conversation

@NPFernando

Copy link
Copy Markdown
Owner

Summary

  • Make Home-page tool-card rows wrap at viewport-aware breakpoints instead of compressing five cards into a narrow row.
  • Preserve native Streamlit layout for metric and ordinary form columns by scoping the CSS to tool-card rows only.
  • Add responsive-layout contract coverage.
  • Replace a rate-limit-sensitive public geolocation unit test with a deterministic mocked API response.

Responsive behavior

  • Up to 1180px: cards wrap with a readable three-column target and 17rem minimum width.
  • Up to 860px: two columns.
  • Up to 560px: one full-width card per row.

Verification

  • Full pytest -q passed.
  • Full ruff check . passed.
  • compileall, pip check, and git diff --check passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7126474f60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread utils/ui.py
Comment on lines +4270 to +4272
@media (max-width: 1180px) {
[data-testid="stHorizontalBlock"]:has([class*="st-key-tool_card_"]) {
flex-wrap: wrap;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Base wrapping on the grid's available width

When the sidebar is expanded on laptop/desktop viewports just above 1180px, the main content grid is substantially narrower than the viewport, but this media query does not activate, so render_tool_section() still compresses all five columns into the same unreadable row this change intends to prevent. Use a container query for the horizontal block or raise/adjust the breakpoint to account for the sidebar rather than keying solely off viewport width.

Useful? React with 👍 / 👎.

@NPFernando
NPFernando merged commit 6c73ec0 into main Aug 16, 2026
6 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.

1 participant