-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Descriptive terms #275
base: dev
Are you sure you want to change the base?
Descriptive terms #275
Conversation
ef4099a
to
73acff4
Compare
73acff4
to
29f92a0
Compare
Reset the branch to only have the relevant commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I found an oversight in the HTML logic for this
app/helpers/orchid/display_helper.rb
Outdated
@@ -36,6 +36,7 @@ def metadata_create_field_link(api_field, item) | |||
item_label = value_label(api_field, item) | |||
link_to item_label, prefix_path(route_path, search_params), | |||
rel: "nofollow" | |||
"<dd>#{link}</dd>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no link
variable in scope here. The return of link_to
would have to be assigned to one first. But I think there's another oversight here. This is the only place we have <dd>
and </dd>
tags. This code here only affects output when the metadata
method isn't called with link: false
, but it is in many places. So they won't be wrapping non-link metadata info as the non-centralized <li>
tags in the template were before. I think we actually want to just remove this line here and handle output of the <dd>
tags in the .map
above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed as suggested
app/helpers/orchid/display_helper.rb
Outdated
@@ -22,7 +22,7 @@ def metadata(res, label, api_field, link: true, separator: " | ") | |||
end | |||
end | |||
html << dataArray | |||
.map { |i| "<span>#{i}</span>" } | |||
.map { |i| "#{i}" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think changing this to
.map { |i| "<dd>#{i}</dd>" |
is what we want to replace all of the old <li>
tags with <dd>
tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed as suggested
Testing this on whitman, I noticed it caused some styling changes. Maybe that needs to be handled in the specific project rather than Orchid. |
See #239 which got closed because it was based on a branch I deleted, reopening. I think there were some outstanding issues left on it.