-
Notifications
You must be signed in to change notification settings - Fork 0
Sample implementation of the UI for ETT-1218 (seq) and ETT-745 (full_download) #281
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
base: main
Are you sure you want to change the base?
Conversation
TODO: need tests
| "pages" => :pages_eq, | ||
| "full_download" => :full_download_eq | ||
| "full_download" => :full_download_eq, | ||
| "seq" => :seq_eq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if ransack needs to even be aware of seq, it won't get used since there's no need to expose it in the UI as a search term.
| class="<%= th_class %>" | ||
| data-filter-control="<%= control %>" | ||
|
|
||
| data-force-export="true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only interesting bit.
| end | ||
| end.sort.uniq | ||
| pages = seq.count | ||
| seq = seq.join(",") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was happy with this little block of code to make a reasonable seq value. You'll never see it except in the exports.
From #281 TODO: * Incorporate seeds from that PR; test it out * Consider migrating controller test for download export to rspec request spec
* Add seq in export, but hide from display * Prevent table export from trying to interpret numbers (otherwise it tries to interpret e.g. seq="9,10,11" as if it's a number like 1,000,000) * Incorporates some suggestions from #281 * Request spec for downloads controller json; migrate other downloads controller json tests from minitest
* Add seq in export, but hide from display * Prevent table export from trying to interpret numbers (otherwise it tries to interpret e.g. seq="9,10,11" as if it's a number like 1,000,000) * Incorporates some suggestions from #281 * Request spec for downloads controller json; migrate other downloads controller json tests from minitest
* Add seq in export, but hide from display * Prevent table export from trying to interpret numbers (otherwise it tries to interpret e.g. seq="9,10,11" as if it's a number like 1,000,000) * Incorporates some suggestions from #281 * Request spec for downloads controller json; migrate other downloads controller json tests from minitest
This is semi-old non-rebased code for edutainment purposes only.
@aelkiss see
app/views/ht_downloads/index.html.erbfor use ofdata-force-exportanddata-visibleto keepseqout of the UI but include it in the export.Do not merge this PR.