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
Should 0.6.3 revert CSV pagination, going back to the 10k limit? #2847
Comments
CC-ing everyone from #2449: @joallard, @gsilis, @bkno, @lauren, @stereoscott, @ball-hayden, @mattolson, @abhimediratta, @pcreux As well as @kim3er from a8ad4f9#commitcomment-4524305 |
Props on trying to adopt Semver, and yes, I think in the spirit of it, you should revert it. As a user, I wouldn't expect 0.6.1->0.6.3 to introduce that change, but 0.7.0/1.0.0, yes. |
I'd prefer to simply revert. |
+1 for reverting the feature
|
+1 for reverting (#2821 is not about fixing CSV pagination, just allows to change max_per_page dynamically ) |
I'd also recommend just reverting the feature and perhaps noting next to the download link that only 10K records will be available for those with very large data sets. |
I like the idea of stating the limit in the UI, promoting it as a feature perhaps. |
A reference for the aforementioned monkey patch Add the following to app/admin/fix_csv_pagination.rb # Workaround for until https://github.com/gregbell/active_admin/issues/2847 is resolved
module ActiveAdmin
class ResourceController < BaseController
module DataAccess
alias original_apply_pagination apply_pagination
def apply_pagination(chain)
request.format == 'text/csv' ? chain.limit(10000) : original_apply_pagination(chain)
end
end
end
end |
This has now been reverted on 0-6-stable and on master. |
Hey @seanlinsley thanks for acknowledging the problems with the approach to this change; it caused some minor headaches but at the end of the day we all found reasonable workarounds. Semver is a welcomed change for sure; looking forward to updating to 0.6.3 & pulling out my patches! I'm going to mention #1924 here since that was a related issue & there are some good ideas there about a proper export screen. Maybe a future release can incorporate something along those lines; for now the return of 10k CSVs is most excellent! |
a8ad4f9 was introduced in 0.6.1 as a naive attempt to make AA better by intentionally causing everyone pain under the assumption that pain motivates. In reality, everyone who relied on the old behavior just monkey-patched around it.
This was a mistake on my part, and I sincerely apologize to every developer who had to figure out for themselves why CSV export was no longer working as expected, and also to every user who had a core part of their workflow broken for no good reason.
We haven't really been following Semantic Versioning, but I think we should start. Master has a considerable amount of breaking changes in it, so it deserves to be 1.0.0. 0.6.2 was a bugfix release, and I want 0.6.3 to be as well (#2742).
The question here is: how should we fix this in 0.6.3? Simply revert a8ad4f9? @Fivell's #2810 / #2821 certainly makes pagination more easily customizable, but it doesn't actually solve the problem at hand. I'd appreciate everyone's thoughts on this.
The text was updated successfully, but these errors were encountered: