-
Notifications
You must be signed in to change notification settings - Fork 62
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 Export Link widget #1997
Add Export Link widget #1997
Conversation
@doekenorg Thanks, this is a good start! A few things I noticed upon review:
A couple of questions:
|
This is related to #1560 as well, since we want to integrate an icon picker. |
@zackkatz Ehlers and I noted that the GravityExport support doesn't really make sense here. I created a different issue on that repo to make a separate widget. I feel like it doesn't belong in the gravityview repo. I'll look into the rest. |
@zackkatz I think I'm a little lost here. This issue is to create a link to the regular view csv / tsv, because people forget to add the correct link. So I'm not sure where these settings are coming from. There are no search parameters. If As for datatables, that looks like a whole different ballgame. I don't think this issue and that feature relate to each other. I can fix the javascript you mentioned, and make sure it also looks for |
@doekenorg Nice! Good start. Cool to see the nonce working.
On the View URL
What do you think I'm missing? |
646ce64
to
30b08e7
Compare
@zackkatz I've fixed the issues at hand (and removed a bunch of warnings from unit tests). As for So we can either make that explicit with a notice on the widget. Or we can make it follow the same logic as |
993c431
to
8ab3cf1
Compare
8ab3cf1
to
7519a97
Compare
We need to formalize this, but I think we should use our own methods, when we have them available, so that we can implement optimizations.
- Open in same window - Define `download` attribute to provide browser hinting - Add `type` attribute for MIME type hinting In addition, I: - Switched from sprintf() to strtr() for readability - Updated the sanitization functions to match content type https://accessabilly.com/proposal-for-a-more-accessible-download-link/ https://www.nngroup.com/articles/new-browser-windows-and-tabs/#pdfs-and-other-nonhtml-documents
$value can be an array. Since we don't use it, removing the strict type hinting here doesn't matter.
I wanted to update the link URL when searching via DataTables, and it wasn't possible because the link didn't have any default CSS class. To match existing widget structure, I'm adding a `<div>` wrapper.
This allows easy modification in DataTables for when searches are performed.
This should be released in concert with a DataTables change: https://github.com/GravityKit/DataTables/commit/c95170578e57920c87ec22f200e6a66a357174b1 |
…-easily-used-in-the-view
@doekenorg I'm not clear on what "An entry link was added to the CSV output." means in the changelog. Can you elaborate? |
@zackkatz oh sorry. When downloading a CSV with the REST API, there was an |
Works well for me 👍 |
…-easily-used-in-the-view
This PR addresses #1891.
It adds a CSV (or TSV) download link widget with a label and option to wrap inside a
![disabled](https://github.com/GravityKit/GravityView/assets/529515/cb62a001-d07a-4f37-8b0c-9d4bdc04a209)<p>
tag.