Skip to content

fix/wrap#419

Open
interim17 wants to merge 5 commits intofeature/image-swipefrom
fix/wrap
Open

fix/wrap#419
interim17 wants to merge 5 commits intofeature/image-swipefrom
fix/wrap

Conversation

@interim17
Copy link
Contributor

Problem

Ongoing mobile work.

Making labels wrap in the mutation table, fixing some spacing and overflow in the clone table.

Solution

  • Bug fix (non-breaking change which fixes an issue)

Screenshots (optional):

Screenshot 2026-02-03 at 4 34 56 PM Screenshot 2026-02-03 at 4 34 49 PM

Comment on lines +19 to +33
return (
<span>
{parts.map((part, index) => {
if (part.startsWith("[") && part.endsWith("]")) {
const bracketsRemoved = part.slice(1, -1);
return (
<span key={index} className={className}>
{bracketsRemoved}
</span>
);
}
return part;
})}
</span>
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some of these were breaking in undesired ways and a wrapping span seems to fix it.

rows.push({
key: "f_primer",
label: "F Primer for PCR/Sequencing:",
label: <>F Primer for PCR/<wbr />Sequencing:</>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very basic technique I have not used enough, tell it where to break the line.

@interim17 interim17 marked this pull request as ready for review February 4, 2026 01:02
@interim17 interim17 changed the title Fix/wrap fix/wrap Feb 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses mobile responsiveness issues in mutation and clone tables by fixing label wrapping and adjusting spacing for improved display on smaller screens.

Changes:

  • Added explicit text wrapping for mutation table labels on mobile screens
  • Adjusted padding for clone table cells to prevent overflow on mobile devices
  • Refactored primer labels to use <wbr> tags for controlled line breaking

Reviewed changes

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

File Description
src/style/info-panel.module.css Added width constraint and text wrapping for description labels on mobile
src/style/clone-table.module.css Added responsive padding for table headers and cells on mobile
src/components/SubPage/EditingDesign.tsx Wrapped formatting function output in span element and added line break hints for primer labels

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

.container :global(.ant-descriptions-item-label) {
font-size: 12px;
width: 88px;
text-wrap: wrap;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The text-wrap property should be white-space or word-wrap. The CSS property text-wrap is part of the CSS Text Module Level 4, which may not be fully supported across all browsers. Consider using word-wrap: break-word; or overflow-wrap: break-word; for better browser compatibility.

Suggested change
text-wrap: wrap;
overflow-wrap: break-word;

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

@interim17 interim17 Feb 5, 2026

Choose a reason for hiding this comment

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

Comment on lines +19 to +21
return (
<span>
{parts.map((part, index) => {
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The wrapping span element should have a key prop when used as a container for mapped elements, or the map should return a fragment. Since React fragments cannot have keys, consider using React.Fragment with a key or ensure the span serves a semantic purpose.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

@interim17 interim17 Feb 5, 2026

Choose a reason for hiding this comment

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

I don't know about this, I know items IN the list should have keys, why does the container need a key?

I think it's fine to use a span here, although it's possible a fragment could work. It doesn't need a key either way.

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