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

Ajax datatable admin registrations #2189

Merged

Conversation

bear454
Copy link
Contributor

@bear454 bear454 commented Sep 22, 2018

Short description of what this resolves/which issues does this fix?:

  • Registrations is a beastly monster, loading thousands of records in hundreds of queries.

Changes proposed in this pull request:

Supercedes openSUSE#2031 .

Note:

* "Questions" modals have been dropped from this view; questions are no
  longer asked on registration, since Surveys(PR#1100)  were added.
@bear454 bear454 force-pushed the ajax-datatable-admin-registrations branch from 8dd204a to f3a5759 Compare September 22, 2018 02:15
@codecov
Copy link

codecov bot commented Sep 22, 2018

Codecov Report

Merging #2189 into master will decrease coverage by 0.77%.
The diff coverage is 6%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2189      +/-   ##
==========================================
- Coverage   82.22%   81.45%   -0.78%     
==========================================
  Files         149      150       +1     
  Lines        4894     4944      +50     
==========================================
+ Hits         4024     4027       +3     
- Misses        870      917      +47
Impacted Files Coverage Δ
app/datatables/registration_datatable.rb 0% <0%> (ø)
app/controllers/admin/registrations_controller.rb 59.52% <75%> (+1.62%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2ad141...f3a5759. Read the comment docs.

@bear454
Copy link
Contributor Author

bear454 commented Oct 10, 2018

@hennevogel - review this already :P

%h3{id: 'question-modal-header'}
Questions for Foobar
.modal-body#question-modal-body
:javascript
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really think you should put this into a .js file in the asset pipeline...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I go back and forth on that... and here's what I've come up with:

  • If it's used on one page, it belongs in that page.
  • If it's used more than once, it should be in the asset pipeline.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the only overhead you would generate people downloading those ~80 lines once :-D But okay

@hennevogel hennevogel merged commit d7a0936 into openSUSE:master Oct 10, 2018
@bear454 bear454 deleted the ajax-datatable-admin-registrations branch October 10, 2018 21:21
%td{ 'data-order' => registration.attended.to_s }
= check_box_tag "#{@conference.short_title}_#{registration.id}", registration.id, registration.attended,
class: 'switch-checkbox',
url: toggle_attendance_admin_conference_registration_path(@conference.short_title, id: registration.id)+"?attended="
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bear454 you have completed removed attendance from the registrations. Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's useless. It's not an effective sort, or filter, you can't get an overall count of it, and it's only set if you use one of the check-in methods (which are terrible upstream).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the concerns, however I don't agree with the removal. I am pretty sure there are some conferences using this feature.

I didn't expect a PR that aims to improve performance, to actually remove a feature we had :/
If this was discussed, I've clearly missed the conversation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants