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

Search Item Resources #3

Open
kerryrobinson opened this issue Apr 16, 2021 · 5 comments
Open

Search Item Resources #3

kerryrobinson opened this issue Apr 16, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@kerryrobinson
Copy link

Is your feature request related to a problem? Please describe.
So glad that we can look at item resources now in ArcGIS assistant! This is helpful to me especially for looking into web styles. One issue is that there are thousands of small files that make up a web style, so it is hard to find the particular resource I'm interested in.

Describe the solution you'd like
A search bar in Item Resources would be make it much easier to find the file I need.

Describe alternatives you've considered
None.

Additional context
Example result looking at a web style resources:
image

@kerryrobinson kerryrobinson added the enhancement New feature or request label Apr 16, 2021
@jpeterson
Copy link
Member

jpeterson commented Apr 16, 2021

Thanks for submitting this, @kerryrobinson! We have discussed a search for Item Resources but hadn't prioritized it because we had not seen many cases where there were more than a handful of resources per item. This is a perfect one 🙂

Out of curiosity – how useful would you find filtering capabilities like we've mocked up below?

image

cc @codylawson

@kerryrobinson
Copy link
Author

@jpeterson Great. I think your mockup would work well... a combination of search and filtering by file type is perfect. Also the ability to view/edit a json file that's an item resource.

@jpeterson
Copy link
Member

Hey @kerryrobinson, just wanted to check back with a status update on this one...

Here are a few implementation notes/questions we're pondering:

Item Resources don't support querying

The item resources endpoint (REST API, rest-js) doesn't appear to support querying or filtering of any kind. This means we would need to fetch all resources and do any filtering client-side.

Should we prompt users to fetch all resources when there are many?

It's possible there will be many resources for an item (this Web Style has 8,379). A couple approaches we could take:

  1. Just fetch them all (100 at a time). For the item above this would result in 84 requests.
  2. Fetch the first page, then use the total property in the response to determine whether we should prompt the user with something like "This item has 8,379 resources, we'll need to fetch them all if you want to filter or search. Would you like to continue?"

image

@kerryrobinson
Copy link
Author

Thanks @jpeterson. I think the second option is OK.

@jpeterson
Copy link
Member

Just updating this issue to note that we are planning to hold off on this until the /resources endpoint in the ArcGIS REST API supports searching and filtering.

cc @kerryrobinson

@jpeterson jpeterson removed their assignment Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants