Skip to content

Fix mappings mobile layout - #2134

Merged
UnniKohonen merged 2 commits into
mainfrom
fix-mappings-layout-on-mobile
Nov 12, 2026
Merged

UnniKohonen merged 2 commits into
mainfrom
fix-mappings-layout-on-mobile

Conversation

@UnniKohonen

@UnniKohonen UnniKohonen commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Reasons for creating this PR

Mappings are currently visually broken on mobile. Very long labels overlap with vocab names like in the attached photo (https://test.dev.finto.fi/yso/fi/page/p39593)

image

This PR adds a new layout for very narrow screens and makes long labels overflow to the next line.

Link to relevant issue(s), if any

Description of the changes in this PR

  • New layout for screens below sm break point (see attached image)
  • Remove unnecessary top border from first mapping
  • Overflow long labels to the next line
  • Set main content margins correctly for screens below md breakpoint
image

Addresses requirement 2.1 in #1753

Known problems or uncertainties in this PR

Not sure if breaking long labels is really the best approach but it is an improvement over the status quo.

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@UnniKohonen UnniKohonen added this to the 3.6 milestone Nov 11, 2026
@UnniKohonen UnniKohonen self-assigned this Nov 11, 2026
@UnniKohonen UnniKohonen moved this to Under review in Skosmos 3.x Backlog Nov 11, 2026
@UnniKohonen
UnniKohonen requested a review from Vainonen November 11, 2026 13:58
@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.99%. Comparing base (62f0012) to head (949bb1a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2134   +/-   ##
=========================================
  Coverage     70.99%   70.99%           
  Complexity     1723     1723           
=========================================
  Files            34       34           
  Lines          4479     4479           
=========================================
  Hits           3180     3180           
  Misses         1299     1299           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Vainonen Vainonen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems to improve mobile viewing as good as possible, so looks fine time. The same fix with break-work could be applied to some other elements in the page, e. g. Skosmos widgets. I noticed that the vocabulary name is not broken with break-word. After commenting that prop-mapping-vocab should also be "broken" I am not sure if breaking URLs to two lines is a good idea. I got the screenshot with very large zoom level.

Comment thread resource/css/skosmos.css Outdated
}

@media (max-width: 992px) {
#concept-mappings .prop-mapping-label {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The break-word should also be included to prop-mapping-vocab class, because vocabulary names might too overflow:

kuva

@UnniKohonen
UnniKohonen requested a review from Vainonen November 12, 2026 10:27

@Vainonen Vainonen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fine, now the overflown URIs are broken into multiple lines and this can finally be merged.

@UnniKohonen
UnniKohonen merged commit 5e85665 into main Nov 12, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from Under review to Issue/PR closed in Skosmos 3.x Backlog Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Issue/PR closed

Development

Successfully merging this pull request may close these issues.

Test mobile usage and fix critical regressions

2 participants