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

Allow toggling samples & regions in add things step UI #1378 #1343

Merged
merged 7 commits into from
Nov 10, 2023

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Oct 11, 2023

Closes #1378

  • Add toggles for filtering samples/analysis areas out of search results
  • Sort collection in sidebar alphabetically by parent
  • Group and indent children under parent

Demo

Screenshot 2023-10-26 at 12 02 01 PM

@jacobtylerwalls jacobtylerwalls changed the title Remove sample & sample areas from add things step UI #1305 Allow toggling samples & regions in add things step UI #1378 Oct 25, 2023
@jacobtylerwalls jacobtylerwalls linked an issue Oct 25, 2023 that may be closed by this pull request
4 tasks
const tilesBelongingToManifest = this.tilesBelongingToManifest(self.card.tiles(), self.canvases());
const tilesBelongingToManifest = this.tilesBelongingToManifest(self.card.tiles());
Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated cleanup re #1304; this function no longer takes two args, missed it before merge.

Comment on lines +340 to +341
) && (self.includeSamples() || !result.text.includes(sampleSubstring))
&& (self.includeAnalysisAreas() || !result.text.includes(regionSubstring))
Copy link
Member Author

Choose a reason for hiding this comment

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

I still found substring matching necessary to filter out children from the select2 widget, as I don't have access to concepts/tiles at that point. Open to other ideas.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could do something like this on the Arches side: https://github.com/archesproject/arches/pull/10216/files

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think the graphid will help, because both samples and their parents will share the same graph id for physical thing. AFAICT I would need to drill in to the tile data along the lines of what I did in the middle of the long sort function added in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just tested it out, and this is all I get back with archesproject/arches#10216:

        {
            "context": "",
            "context_label": "Physical Thing - Name",
            "graphid": "9519cb4f-b25b-11e9-8c7b-a4d18cec433a",
            "id": 1,
            "text": "qwe [Sample of Alabastron (2003.192)]",
            "type": "term",
            "value": "qwe [Sample of Alabastron (2003.192)]"
        },
        {
            "context": "",
            "context_label": "Physical Thing - Name",
            "graphid": "9519cb4f-b25b-11e9-8c7b-a4d18cec433a",
            "id": 2,
            "text": "qwe [Sample Area of Alabastron (2003.192)]",
            "type": "term",
            "value": "qwe [Sample Area of Alabastron (2003.192)]"
        }

Copy link
Member

Choose a reason for hiding this comment

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

I see - right, it's the distinction between types of physical things that is needed, not resource models.

@jacobtylerwalls
Copy link
Member Author

@chiatt ready for a look!

Copy link
Member

@chiatt chiatt left a comment

Choose a reason for hiding this comment

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

This looks great. I think we can address the issue with filtering the dropdown results once this work is completed: #1435

@chiatt chiatt merged commit e2679e7 into dev/1.1.x Nov 10, 2023
1 check passed
@chiatt chiatt deleted the 1305-remove-sample-children branch November 10, 2023 01:44
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.

Add things step UI improvements for child physical things
2 participants