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

Add project: search project by URL #451

Open
humitos opened this issue Aug 14, 2024 · 3 comments
Open

Add project: search project by URL #451

humitos opened this issue Aug 14, 2024 · 3 comments
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@humitos
Copy link
Member

humitos commented Aug 14, 2024

It would be good to be able to just paste the GitHub URL of the project and get the exact result.

Peek 2024-08-14 17-13

That will be a lot quicker. Besides, it would avoid typos, or even importing repositories with the same name (forks from another organization/user).

Front logo Front conversations

@humitos humitos added the Improvement Minor improvement to code label Aug 14, 2024
@humitos
Copy link
Member Author

humitos commented Aug 14, 2024

It seems the filtering is done in the backend when hitting the API endpoint:

config.urls.remoterepository_list + "?expand=projects&full_name={query}";

So, if we want to go that way, we would need to add an extra filter in the endpoint: https://docs.readthedocs.io/en/stable/api/v3.html#get--api-v3-remote-repositories-

@humitos
Copy link
Member Author

humitos commented Aug 14, 2024

We can probably pass &html_url= instead of full_name since it will work for both since the full name is contained on the html_url field as well.

@humitos humitos added the Needed: design decision A core team decision is required label Aug 14, 2024
@agjohnson
Copy link
Contributor

agjohnson commented Aug 14, 2024

Not necessarily, some users rename their projects to verbose names that don't match their repo name. The change here is likely altering the API to be able to search both/multiple fields. The user isn't super clear, I also interpreted the user's suggestion as not the project creation search but the top navigation search:

image

I think both could use something similar though.

There are other Project fields that might be useful to query as well. I'm likely describing ?expand=projects&search={query} -- or is there a native DRF version of this?

This should probably be moved to the application. The front end would just use a different field name in the query.

I'm not quite sure about this exact use case, I don't think too many folks are pasting URLs in these boxes, but there is some better UX in searching more fields. I'll put this on the new features milestone, it's not a high priority/bug.

@agjohnson agjohnson added this to the New dashboard features milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

2 participants