Skip to content
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

Bound with redesign #4070

Closed
wants to merge 1 commit into from
Closed

Bound with redesign #4070

wants to merge 1 commit into from

Conversation

jcoyne
Copy link
Contributor

@jcoyne jcoyne commented Mar 4, 2024

Ref #4074

Screenshot 2024-03-08 at 12 30 11 PM

@jcoyne jcoyne force-pushed the redesign-bound-with branch 6 times, most recently from e7faba0 to c55e250 Compare March 6, 2024 15:33
@jcoyne jcoyne changed the title WIP bound with redesign Bound with redesign Mar 6, 2024
@jcoyne jcoyne changed the title Bound with redesign [HOLD] Bound with redesign Mar 6, 2024
@jcoyne jcoyne changed the title [HOLD] Bound with redesign Bound with redesign Mar 6, 2024
@jcoyne jcoyne force-pushed the redesign-bound-with branch from c55e250 to 1460c50 Compare March 6, 2024 20:42
@jcoyne jcoyne marked this pull request as ready for review March 6, 2024 20:43
@jcoyne jcoyne force-pushed the redesign-bound-with branch 3 times, most recently from dcf1113 to 8b22a43 Compare March 6, 2024 22:37
@jcoyne jcoyne force-pushed the redesign-bound-with branch 4 times, most recently from 1508530 to f5d39dc Compare March 14, 2024 12:44
def bound_with_title
bound_with = item.bound_with_parent

# TODO: remove this after the index is rebuild with https://github.com/sul-dlss/searchworks_traject_indexer/pull/1379
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this was merged 2 weeks ago so the index should have been reindexed by now. Please remove these lines before merge.


# TODO: remove this after the index is rebuild with https://github.com/sul-dlss/searchworks_traject_indexer/pull/1379
return if bound_with.respond_to?(:instance)

Copy link
Contributor

Choose a reason for hiding this comment

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

See above comment

@@ -0,0 +1,69 @@
# frozen_string_literal: true

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be repeating a lot of what is in module AccessPanels.LocationItemComponent. Is there a reason we have to repeat all the same code. Could we use inheritance or something along those lines to not repeat code?

Copy link
Contributor Author

@jcoyne jcoyne Mar 19, 2024

Choose a reason for hiding this comment

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

Yes, but I believe the way to do that is by extracting a new class rather than forcing inheritance. I'm trying not to make this PR too challenging to review, thus I've avoided this at this time. Keep in mind that #4107 comes after this PR and will substantially change what is in here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #4151 as a way to preemptively reduce the duplication.

@@ -62,6 +62,11 @@ def type
item_display[:type]
end

# TODO: I believe we can look in `bound_with.hrid` for this after a reindex
def instance_hrid
item_display[:instance_hrid]
Copy link
Contributor

Choose a reason for hiding this comment

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

Please double check before merge.

# TODO: This depends on https://github.com/sul-dlss/searchworks_traject_indexer/pull/1379
return item_display[:bound_with] if item_display[:bound_with]

# TODO: we're only keeping the rest of this until the index is rebuild with the PR linked above PR
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove. Reindex should have happened.

@jcoyne jcoyne force-pushed the redesign-bound-with branch 2 times, most recently from 8104917 to 963d3d9 Compare March 19, 2024 15:09
jcoyne added a commit that referenced this pull request Mar 19, 2024
From the component. This supports the split of the LocationItemComponent in #4070, so that there is no duplication
@jcoyne jcoyne force-pushed the redesign-bound-with branch from 963d3d9 to fb6495e Compare March 19, 2024 15:40
@cbeer cbeer mentioned this pull request Jun 25, 2024
@cbeer cbeer closed this Jun 28, 2024
@cbeer cbeer deleted the redesign-bound-with branch June 28, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants