Skip to content

Conversation

nyaomaru
Copy link

Summary

Fix the layout of the Scope textarea on the publish settings (/new) page.
Added w-full in new.tsx so the textarea now expands to the full container width.

Description

  • Problem: On /new (publish settings), the Scope textarea renders too narrow, which makes typing/reading awkward on typical viewports.
  • Fix: Apply width: 100% (scoped to the publish form) so the control uses the available space.
  • Why safe: The selector is limited to the publish page; no other forms are affected.
  • Manual test: Run deno task prod:frontend, open http://jsr.test/new, verify the Scope textarea spans the container width; check responsive breakpoints.
  • Screen shot
    • Before:
      • jsr_narrow_typing_spaxe
    • After:
      • jsr_narrow_typing_spaxe_fixed
      • jsr_narrow_typing_spaxe_fixed_mobile

PR Checklist

  • The PR title follows
    conventional commits
  • Is this closing an open issue? If so, link it, else include a proper
    description of the changes and rason behind them.
  • Does the PR have changes to the frontend? If so, include screenshots or a
    recording of the changes.

    If it affect colors, please include screenshots/recording in both
    light and dark mode.
  • Does the PR have changes to the backend? If so, make sure tests are added.

    And if changing dababase queries, be sure you have ran sqlx prepare
    and committed the changes in the .sqlx directory.

@CLAassistant
Copy link

CLAassistant commented Sep 14, 2025

CLA assistant check
All committers have signed the CLA.

@nyaomaru
Copy link
Author

It looks like CI surfaces an unrelated type error:

TS2345 [ERROR]: Argument of type 'Uint8Array<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
  Type 'Uint8Array<ArrayBufferLike>' is missing the following properties from type 'URLSearchParams': size, append, delete, get, and 2 more.
    return new Response(await ogpImage.encode(), {
                        ~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/runner/work/jsr/jsr/frontend/routes/package/og.ts:396:25

error: Type checking failed.
Error: Process completed with exit code 1.

This seems unrelated to this PR (UI fix on /new), but I can follow up in a separate PR.
A minimal fix would be to wrap the Uint8Array in a Blob (or pass its ArrayBuffer) so it satisfies BodyInit:

// Option A: Blob (recommended)
const bytes = await ogpImage.encode(); // Uint8Array
return new Response(new Blob([bytes], { type: "image/png" }), {
  headers: { "content-type": "image/png" },
});

// Option B: ArrayBuffer
const bytes = await ogpImage.encode(); // Uint8Array
return new Response(bytes.buffer, {
  headers: { "content-type": "image/png" },
});

If you prefer, I’ll open a follow-up PR with this change so we keep this PR scoped to the textarea width fix.

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