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

"Stream all rows" is not at all obvious #1142

Open
simonw opened this issue Dec 12, 2020 · 9 comments
Open

"Stream all rows" is not at all obvious #1142

simonw opened this issue Dec 12, 2020 · 9 comments

Comments

@simonw
Copy link
Owner

simonw commented Dec 12, 2020

Got a question about how to download all rows - the current option isn't at all clear.

loans__ppp_loans__9_511_rows_where_where_search_matches__tech__sorted_by_rowid

@nitinpaultifr
Copy link

'Include all rows' seem like a fairly obvious alternative

@simonw
Copy link
Owner Author

simonw commented Dec 12, 2020

Yeah, maybe with the number of rows to make it completely clear. Include all 2,455 rows perhaps.

@simonw
Copy link
Owner Author

simonw commented Dec 12, 2020

You're actually choosing between two options here: the 100 rows you can see on the screen, or the x,000 rows that match the current query.

Maybe a radio box would be more obvious?

@nitinpaultifr
Copy link

Agreed, it would definitely provide better controls. However, I do feel it makes for a bit of inconsistent UX for the 'Advanced export' section, with links to download for JSON, checkboxes and radio buttons + button to download for CSV. Do you think this example makes the UX a bit nicer/consistent?

Screenshot 2020-12-13 at 5 38 43 PM

I could give it a try if you'd like but I've never contributed to an actual project!

@simonw
Copy link
Owner Author

simonw commented Dec 14, 2020

That's a really solid design for this! I'd be very happy to review a pull request - you should be able to implement this with just template edits and some CSS changes I think.

@nitinpaultifr
Copy link

Alright I could give it a try! This might be a stupid question, can you tell me how to run the server from my fork? So that I can test the changes?

@simonw
Copy link
Owner Author

simonw commented Dec 14, 2020

To check out and start the server:

/tmp % git clone git@github.com:nitinpaul/datasette
Cloning into 'datasette'...
remote: Enumerating objects: 124, done.
# ...
datasette % python3 -m venv venv
datasette % source venv/bin/activate
(venv) datasette % pip install -e '.[test]'
Obtaining file:///private/tmp/datasette
Collecting asgiref<3.4.0,>=3.2.10
Using cached asgiref-3.3.1-py3-none-any.whl (19 kB)
# ...
(venv) datasette % datasette
INFO:     Started server process [24002]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)

And to run the tests:

(venv) datasette % pytest
======================================================================== test session starts ========================================================================
platform darwin -- Python 3.9.1, pytest-6.1.2, py-1.10.0, pluggy-0.13.1
SQLite: 3.34.0
rootdir: /private/tmp/datasette, configfile: pytest.ini
plugins: asyncio-0.14.0, timeout-1.4.2
collected 841 items                                                                                                                                                 

tests/test_package.py ..                                                                                                                                      [  0%]

@simonw
Copy link
Owner Author

simonw commented Dec 14, 2020

I'm not sure about the radio boxes for JSON, just because you can't right-click on a radio box and copy it to your clipboard like you can with links. Worth trying it out though.

The radio boxes for that CSV option are definitely the right way to go.

@nitinpaultifr
Copy link

You're right, probably more straightforward to have the links for JSON. I was imagining to toggle the href for the 'Export JSON' link (button) to the selected shape, but it'll probably be needlessly complex in the end.

@simonw simonw added the csv label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants