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

Y24-486: Add relatives tab #2114

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Conversation

StephenHulme
Copy link
Contributor

Closes #2097

Changes proposed in this pull request

  • Add relatives tab
  • Move data_attributes to within the list-item it relates to

Screenshot

Screenshot 2024-12-09 at 16 56 17

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

It will be populated with whatever is assigned to parents and children
@StephenHulme StephenHulme changed the base branch from develop to y24-088-tuberacks-epic December 9, 2024 16:56
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.67%. Comparing base (db9b440) to head (37d98e9).
Report is 156 commits behind head on y24-088-tuberacks-epic.

Additional details and impacted files
@@                    Coverage Diff                     @@
##           y24-088-tuberacks-epic    #2114      +/-   ##
==========================================================
- Coverage                   80.78%   80.67%   -0.11%     
==========================================================
  Files                         482      482              
  Lines                       18295    18296       +1     
  Branches                      269      268       -1     
==========================================================
- Hits                        14780    14761      -19     
- Misses                       3513     3533      +20     
  Partials                        2        2              
Flag Coverage Δ
javascript 74.05% <ø> (-0.18%) ⬇️
pull_request 80.67% <100.00%> (-0.11%) ⬇️
push 80.67% <100.00%> (+<0.01%) ⬆️
ruby 91.11% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@yoldas yoldas left a comment

Choose a reason for hiding this comment

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

Looks good.

<li class="nav-item">
<% data_attributes = {
sequencescape_api: Limber::Application.config.api.v2.connection_options.js_url,
sequencescape_api_key: Limber::Application.config.api.v2.connection_options.authorisation,
Copy link
Member

Choose a reason for hiding this comment

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

It is not specific to this PR but we are including the key in page sources. Maybe we can discuss if there is any alternative to this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, I see that it is in a few places. I agree out of scope for this PR, but would be nice to be addressed.

Copy link
Member

@andrewsparkes andrewsparkes left a comment

Choose a reason for hiding this comment

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

I think check if a SS change to relationships in the resource is needed, it only seems to have parents.

@@ -35,6 +35,7 @@ def model_name
has_many :tubes, through: :racked_tubes, class_name: 'Sequencescape::Api::V2::Tube'

has_many :parents, class_name: 'Sequencescape::Api::V2::Asset'
has_many :children, class_name: 'Sequencescape::Api::V2::Asset'
Copy link
Member

Choose a reason for hiding this comment

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

check the SS side, in case I removed the relationship there?

Copy link
Member

Choose a reason for hiding this comment

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

yeah it's not there, just parents
same with descendants

Copy link
Contributor Author

@StephenHulme StephenHulme Jan 21, 2025

Choose a reason for hiding this comment

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

As there are currently no children (and what children means is still undefined) this doesn't affect operation.
children in this file could alternatively be aliased to racked_tubes (and required attributes delegated) to show the child tubes. Either way, this is better scoped in a separate PR.

@StephenHulme StephenHulme merged commit 6d21ad9 into y24-088-tuberacks-epic Jan 21, 2025
15 of 16 checks passed
@StephenHulme StephenHulme deleted the y24-486-relatives-tab branch January 21, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants