@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/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev