[openstreetmap/openstreetmap-website] Tags editor (PR #6758)
Tom Hughes
notifications at github.com
Fri Jan 30 00:05:30 UTC 2026
@tomhughes commented on this pull request.
> + let summary = makeDetailedPrefix();
+ const mainTagsHint = makeMainTagsHint();
+ if (summary.length > 200 || changedTags.size > 1) {
+ summary = makeOnlyKeysPrefix();
+ }
+ summary = summary.replace(/; $/, "");
+ if (mainTagsHint === "") {
+ summary += ` for ${objectType}/${objectId}`;
+ } else if (removedTags.size) {
+ summary += " from" + mainTagsHint;
+ } else if (changedTags.size) {
+ summary += " of" + mainTagsHint;
+ } else if (addedTags.size) {
+ summary += " to" + mainTagsHint;
+ }
> This Lego string-building would need to be replaced by a series of format strings, one for each scenario.
Actually it should probably be done properly in rails views using turbo - we're trying to get away from doing this sort of thing on the client side and we certainly don't want to be adding more.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6758#discussion_r2744036740
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6758/review/3725602784 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260129/32112cac/attachment.htm>
More information about the rails-dev
mailing list