D61-IA / stellar-gnosis

Gnosis paper management and collaboration tool
Apache License 2.0
0 stars 1 forks source link

Use date picker widget for paper "discuss" in Club view #73

Closed PantelisElinas closed 4 years ago

PantelisElinas commented 4 years ago

In the Club detail view, we list papers that members have proposed for future discussion. These papers have a "Discuss" button that allows the club owner to schedule a paper for discussion at a particular date. Clicking the button, loads the group_entry_update(request, id, eid) view methods, renders that renders a form for the user to specify the date. We want to improve this workflow in the following ways,

  1. We should use AJAX to render the update form. For example clicking the "Discuss" button should bring up a modal to display the form.
  2. We should use a date picker widget to make it easier for the user to select a date. This is as opposed to asking for a date in string format. I had a look at a few date picker widgets that work well with Django. We are interested in the least complex solution. My preferences are either django-flatpickr (https://pypi.org/project/django-flatpickr/) or django-bootstrap-datepicker-plus (https://github.com/monim67/django-bootstrap-datepicker-plus). The former looks like a lighter weight solution and it would be my preference but we should have a closer look at both to make sure that are (a) easy to integrate with our website, (b) are kept up to date, (c) are lightweight solutions.
  3. Date validation should be added. Users should not be able to schedule a paper for a date in the past. In addition, since every club has a regular meeting day, e.g. Mondays, if the user schedules a paper on a date that correspond to a different date, e.g., Friday, the following should happen: The user is prompted with a message that the selected day is different than the club's regular meeting day; the user is given the option to proceed with scheduling or cancel and given the option to select another day.

Done checklist

Zhenghao-Zhao commented 4 years ago

We could also use a frontend datepicker instead, without the need to modify models at the backend: http://jqueryui.com/demos/datepicker/ https://github.com/uxsolutions/bootstrap-datepicker/blob/master/docs/index.rst

PantelisElinas commented 4 years ago

Hi @Zhenghao-Zhao

I have updated this ticket to include information about date validation as we discussed.

Thank you!