feat: Add real-time character limit warning tooltip for tag values#11844
feat: Add real-time character limit warning tooltip for tag values#11844JaiswalShivang wants to merge 7 commits intoopenstreetmap:developfrom
Conversation
|
Hi @tordans, |
tyrasd
left a comment
There was a problem hiding this comment.
Did you try to use the existing module uiLengthIndicator? I do actually like the styling of the error case with the redish background color and underline. But the styling should be consistent between the different places where this error can occur (i.e. regular fields vs. in the raw tag editor), so if possible this should be incorporated into the existing length indicator ui widget.
This comment was marked as outdated.
This comment was marked as outdated.
|
@tyrasd I’ve implemented the suggested changes so that each tag row now uses its own instance of uiLengthIndicator, and the character limit warning appears correctly for each input. I’ve also removed obsolete code and translation keys as discussed. I’m attaching a short video to demonstrate the updated behavior: you’ll see that the warning now displays as expected when a tag value exceeds the character limit, and each row handles its own indicator independently. Please let me know if you have any further feedback or requests! Video2026-02-03.14-57-22.mp4 |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as outdated.
This comment was marked as outdated.
|
Oops, accidentally hit the close button! Reopened it right away. The PR is updated and ready for review. |
Fixes #10241
Summary
Adds a visual warning tooltip that appears in real-time when users exceed the 255 character limit for tag values in the raw tag editor.
Problem
Previously, users had no immediate feedback when entering tag values that exceeded OpenStreetMap's 255 character limit. They would only discover the issue later, leading to confusion and a poor editing experience.
Solution
Changes
modules/ui/sections/raw_tag_editor.js- Added warning span element and real-time input validationcss/80_app.css- Added tooltip styling with arrow indicatordata/core.yaml- Added translation key for warning messageDemo
2026-02-03.13-37-43.mp4
Testing
Checklist