Skip to content

Fix: public share card hidden on mobile#38

Merged
felixgollnhuber merged 2 commits into
mainfrom
copilot/fix-public-link-mobile-display
Mar 29, 2026
Merged

Fix: public share card hidden on mobile#38
felixgollnhuber merged 2 commits into
mainfrom
copilot/fix-public-link-mobile-display

Conversation

Copilot AI commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

The share card (public URL + copy button) was only rendered inside <aside className="hidden xl:block">, making it inaccessible on viewports narrower than 1280px.

Changes

  • event-heatmap.tsx — render sidebarTopContent in the main content column with an xl:hidden wrapper, so it appears above the heatmap on mobile/tablet and stays hidden at xl+ (where the sidebar already shows it):
{sidebarTopContent ? <div className="xl:hidden">{sidebarTopContent}</div> : null}
  • public-event-client.test.tsx — two existing tests queried unique text that now appears twice in the DOM (mobile slot + desktop sidebar). Updated to getAllBy* with .toHaveLength(2) to reflect the new structure. Added a test asserting both the share URL and copy button are present in the DOM at a mobile viewport width.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/tempoll/tempoll/node_modules/.pnpm/prisma@7.5.0_@types&#43;react@19.2.14_react-dom@19.2.4_react@19.2.4__react@19.2.4_typescript@5.9.3/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;7.5.0&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2026-03-29T08:58:18Z&#34;,&#34;project_hash&#34;:&#34;505a7a4c&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/tempoll/tempoll/node_modules/prisma/build/index.js&#34;,&#34;cli_path_hash&#34;:&#34;7ec90f6 (dns block)
  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/tempoll/tempoll/node_modules/.bin/../next/dist/bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copilot AI linked an issue Mar 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix public link visibility on mobile version Fix: public share card hidden on mobile Mar 29, 2026
Copilot AI requested a review from felixgollnhuber March 29, 2026 09:05

Copilot AI 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.

Pull request overview

Fixes the public share card being unavailable on sub-xl viewports by rendering the existing sidebarTopContent in the main column for mobile/tablet layouts, while keeping the sidebar version for xl+.

Changes:

  • Render sidebarTopContent above the heatmap with an xl:hidden wrapper so it shows on smaller viewports.
  • Update existing PublicEventClient tests to account for duplicated UI (mobile slot + desktop sidebar).
  • Add a test asserting the share URL and copy button exist in the DOM for a mobile-sized viewport.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/components/event-heatmap.tsx Adds a mobile placement for sidebarTopContent to make share card content visible below xl.
src/components/public-event-client.test.tsx Adjusts queries to handle duplicated content and adds a new test for mobile presence.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/event-heatmap.tsx
Comment thread src/components/public-event-client.test.tsx
Comment thread src/components/public-event-client.test.tsx
@felixgollnhuber felixgollnhuber marked this pull request as ready for review March 29, 2026 09:20
@felixgollnhuber felixgollnhuber merged commit dd84489 into main Mar 29, 2026
8 checks passed
@felixgollnhuber felixgollnhuber deleted the copilot/fix-public-link-mobile-display branch March 29, 2026 09:22

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +524 to +540
it("renders the share card in the DOM on mobile viewports", () => {
setViewportWidth(390);

renderWithI18n(
<PublicEventClient
slug="test-event"
shareUrl="https://tempoll.app/e/test-event"
initialSnapshot={createSnapshot()}
initialSession={null}
/>,
);

// The share card appears in both the mobile slot and the xl+ sidebar slot,
// so the URL and copy button are present in the DOM at any viewport width.
expect(screen.getAllByText("https://tempoll.app/e/test-event")).toHaveLength(2);
expect(screen.getAllByRole("button", { name: "Copy public URL" })).toHaveLength(2);
});

Copilot AI Mar 29, 2026

Copy link

Choose a reason for hiding this comment

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

This new test doesn’t actually verify the mobile visibility/accessibility regression described in the PR: setViewportWidth(390) won’t affect Tailwind’s hidden/xl:* behavior in JSDOM (no CSS), so the assertions (counting DOM nodes) would also pass when the share card is only rendered in the hidden xl:block sidebar. Consider asserting the structural placement that enables mobile display (e.g., that one instance is inside the new xl:hidden wrapper / add a stable data-slot for the mobile slot) rather than only asserting DOM presence/counts.

Copilot uses AI. Check for mistakes.
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.

Public link not shown on mobile

3 participants