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

Sync url and params tab #166

Open
CH1NRU5T opened this issue Feb 23, 2024 · 7 comments
Open

Sync url and params tab #166

CH1NRU5T opened this issue Feb 23, 2024 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@CH1NRU5T
Copy link
Contributor

Describe the bug/problem
Syncing of url and params tab

Steps to Reproduce the bug/problem

  1. After opening the app, paste https://api.foss42.com/country/data?code=US in the url field
    Screenshot 2024-02-23 at 7 05 41 PM

Expected behavior

  1. If we paste a url which has parameters in it, it should be synced with params tab
    Screenshot 2024-02-23 at 7 06 35 PM
  2. If we add params in the params tab, they should get added in the url.

Device Info (The device where you encountered this issue):

  • OS: MacOS
  • Version: Sonoma 14.3.1
@CH1NRU5T CH1NRU5T added the bug Something isn't working label Feb 23, 2024
@animator
Copy link
Member

Yes this syncup should be added to API Dash

@animator animator added enhancement New feature or request and removed bug Something isn't working labels Feb 24, 2024
@Yousef-Rabia
Copy link
Contributor

@animator I would like to work on this.
Can you assign it to me?

@animator animator added the good first issue Good for newcomers label Feb 25, 2024
@mohnishdeshpande
Copy link

@animator I reckon I have figured out a way to fix this. Will finish the implementation and submit a PR after testing.

@ashitaprasad
Copy link
Member

@Yousef-Rabia We do not assign issues. You are free to work on it and send across a PR.

@ashitaprasad
Copy link
Member

Sure @mohnishdeshpande.

@mohnishdeshpande
Copy link

@ashitaprasad Please see the 'Note' in the PR description regarding 'kNameValueEmptyModel'. Cheers!

@ashitaprasad
Copy link
Member

We had a thorough discussion regarding the approach. And we want to focus on user experience and keep it easy to use for the end user who should be able to view/edit the API endpoint without any difficulty. Adding URL parameters in the URL field hampers the readability and makes editing difficult.
Proposed solution:

  • Have a separate URL preview section under the URL card (simple text with small font size with copy button) which shows the final url including all the query parameters. Users should be able to turn it off via Settings. Any query params entered in the row will automatically update the URL preview.
  • Now, coming to the point - what happens when a user pastes a url with query params or adds a query param in the url field. It should automatically get removed and should get added as a row(s) in the URL parameter section. Note, the URL previewer will show the the full URL including the query params.

cc: @mohnishdeshpande @amankumarmahavar @Tanish2002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment