-
Notifications
You must be signed in to change notification settings - Fork 5
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
Printing room access page #699
base: dev
Are you sure you want to change the base?
Conversation
Added page where users can add EM number from their access cards after having attended a 3D printing course. It is also possible to update EM number, or to re-request access after having lost it.
Added media rule for the modal to make it wider and more readable
Added a content box that allows the printing team to add information about getting access to the 3D-printer room
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev #699 +/- ##
==========================================
- Coverage 88.16% 87.97% -0.20%
==========================================
Files 152 152
Lines 6187 6228 +41
==========================================
+ Hits 5455 5479 +24
- Misses 732 749 +17
|
I personally don't really have any context for why this PR was made - which I would need to be able to review e.g. whether the view code does what it should do - so could you update the description with the motivation behind this PR, like what problem it's trying to solve and why? 🙂 |
Sure. This PR is mainly to help the printing team. Right now, they get a lot of emails from people who have attended a 3D printing course, but forgot to bring their card to the course. When this happens, people have to send their EM number to the printing team, and the printing team need to add it to the model Printer3DCourse manually. When this PR is merged, people can add their EM number themselves via this page. The page also lets users update their card information, and request access to the printing room if they have lost it. When users add or alter their EM number via this page, it is added to the User model, but if the EM number is changed for an instance in the User model, and the same user is added to or already exists in the Printer3DCourse model, the EM number is updated is updated there as well. |
Alright 👌 Feel free to update the PR description (i.e. the "comment" at the top of this page, with "Proposed changes" etc.) with the same info - which could potentially be useful for future reference, so that people don't have to scroll down here to find that info 😊 (The same goes for screenshots :))
Btw, I can't seem to find what part of the added code that does this.. Could you give me a pointer? :) |
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 looks useful! 😊 Before reviewing the code more detailed, I'd like to address some (functional) design issues:
-
First off, I think we should hide the card registration page from people who have not attended a 3D printing course, as I don't think it's a good idea to potentially give people the impression that that form might be the starting point for gaining access, as opposed to through a course event.
Also, letting users who have not taken a 3D printing course register their card number, may cause trouble/confusion when members of the printer team register the card number for that user after it's already been set - at least as long as the course registration form works the way it currently does..
-
I don't think many people will find the page when it's under "Makerverkstedet" in the header, for a couple reasons:
- Naively implementing the above point 1 would make the added "Printing room access" button only visible to people after they've attended a course. However, adding UI elements to a sub-menu after users have had the chance to get familiar with the UI, is generally a bad idea, as they would have no reason to reexplore a sub-menu that they've already categorized in their heads as being pretty much entirely unrelated to 3D printing - as the "Makerverkstedet" sub-menu currently is.
- I think people looking for this functionality (i.e. "I want access to the 3D printing room") will either look for things related to 3D printing - which in practice is only on the "Reservations" (machine list) page, especially for users who are experienced with that page - or they will look for things related to "me" - which would lead them to the user dropdown and then probably "Profile". (I think "Reservations" is most likely, though.)
So, I think a better solution is to instead add the form - or a link to it - on both the "Reservations" page and the "Profile" page; more on that in point 3 below.
- New users who are unfamiliar with the website are usually much more incentivized to explore it, and are therefore likely to find the access form through either the "Reservations" page, the profile page, the FAQ page or the "About" (Makerverkstedet) page (see the suggestion at the bottom of this review comment). And there is also definitely a point to be made that we should limit the number of buttons in the main navigation menus that are overly specific - which I feel this access form kind of is. In other words, elements that are only relevant in certain situations - like losing access to the 3D printing room - should not be in the main navigation menu.
-
The added functionality does indeed pertain to the physical makerspace, but I don't think it belongs in the
makerspace
app (it's absolutely fair to criticize the naming of that app - as well asmake_queue
😅), which is indicated by the fact that the form and view code doesn't reference anything in that app, but instead references code in themake_queue
andusers
apps. Instead, I think the form should be split in two, and:-
The code related to the card number can be moved to
users
, and the card number field moved to a small form on the profile page - which I think is a more natural placement for it. This allows users to check and update their card number at any time (not only when re-requesting access), and helps establish the profile page as the "hub" for the info we have linked to each user (like the already present course completion mini table, and a list of available reservation quotas - that I've written code for locally 🤠).- (This might add an extra reason for us to potentially consider changing the name of the "Profile" button, but that's for another time :))
- When a user updates their card number, their course registration should automatically change status to a new status option (e.g. named
REREQUEST
; see the point below), so that the printer team members know that they should re-send the user's card number to NTNU.
-
The code related to requesting access can be moved to
make_queue
, and the form can just consist of the radio buttons and a submit button; on success, the form can change the user's course registration status to a new option named e.g.REREQUEST
. This separate option will help the printer team members understand what actually happened, in contrast to setting the status toREGISTERED
as the form currently does - which has the potential to cause confusion.Lastly, the access form can probably stay on its own page that's linked to from the profile page, and a new button can be added at the top of the "Reservations" / machine list page (above the two blue buttons) linking to the profile page, with the label "Info linked to you"/"Info knyttet til deg" or something similar. I think the placement and label of this new button will make most/many of the users already familiar with the website curious enough to click it, which will then introduce them to the card number field and the link/button to the access form.
-
-
I don't think it's necessary to add a content box for the access form page, as there's not a lot of text necessary to explain its usage, and because I think it's unlikely to need updating as readily as the other content boxes do.
-
Instead of the
?success=true
query parameter, use Django's messages framework (see howPrinter3DCourseCreateView
and itsprinter_3d_course_create.html
template do it, orMemberStatusUpdateView
and themember_list.html
template). This avoids adding unnecessary elements to the URL, and will likely make the code slightly less complex and less dependent on JavaScript.
Lastly, a suggestion to add to the "Deployment notes" section of the PR description:
After deployment, one or more entries should be added to the FAQ page that explain how a user (who has taken a 3D printing course) can see/update their card number and re-request access to the 3D printing room, as well as providing links to the access form and the card number form on the profile page. The 3D printing room paragraph on the "About" page under "Makerverkstedet" can also be updated to link to the aforementioned form pages.
Sure, I've now updated the PR description, and moved the picture there. |
This is why I 1. want people to log in before they can see this page, 2. only let people add their EM number to their instance in the User model (which means that they can not add themselves to the Printer3DCourse model. They still have to take the 3D printing course and be added to that model by the 3D printing team), and 3. included a content box, so we can give them information about how this works, and also link to 3D printing courses on the event page. That being said - I agree with your comment further down that it might make sense to move this page from the main header. The way it is now - people might stumble upon it, and mistakenly think that they can get access to the printing room without taking a course.
When this page is up and running, the printing team doesn't have to collect EM numbers from course participants anymore. They can just refer everyone who attends a course to this page. If the user has already added his or her EM number via this page when someone from the 3D printing team adds them to the Printer3DCourse model, the user's EM number will show up once the user has been added. And if the user is added to the Printer3DCourse model before he or she adds his/her EM number, this field will be empty until they add it. And only users who have taken the printing course and added their EM number will be sent to "NTNU Vakt og Service", so the same way as it currently works. The only change is that the users can add their own EM numbers, and that someone from the printing team doesn't have to do it for them.
Sure, I agree with this.
Sure, I can remove it from the header, and add it to the "reservations" page and the "profile" page instead
Yup, I agree. I've also added the point about including links on the "About" page under "Makerverkstedet", and the "FAQ" page to "Deployment notes" in the PR description.
I agree - the app names
I considered adding a new status option, and I also asked the 3D printing team about this. They did not feel it was necessary, since they already have a routine of sending all users with an EM number having the status
Again, I talked to the printing team about this, and with their current routine for sending users to "NTNU Vakt og Service", they felt it would be more confusing with a new status option. Also, I'm a bit confused to where you want me to move my code. Is the
Sounds good, I'll change this.
Some members of the printing team wanted this, which is why I added it. I do agree, however, that the info on this page probably don't need to be updated very often. Still - I felt like simply including it in the template would make it look a bit cluttered, which is why I added a separate content box.
Ok, I haven't used this before, but I can look into it. I'll ask if I need any help ;-)
Done! |
Proposed changes
This PR is mainly to help the printing team. Right now, they get a lot of emails from people who have attended a 3D printing course, but forgot to bring their card to the course. When this happens, people have to send their EM number to the printing team, and the printing team need to add it to the model Printer3DCourse manually. When this PR is merged, people can add their EM number themselves via this page. The page also lets users update their card information, and request access to the printing room if they have lost it. When users add or alter their EM number via this page, it is added to the User model, but if the EM number is changed for an instance in the User model, and the same user is added to or already exists in the Printer3DCourse model, the EM number is updated there as well.
Areas to review closely
Deployment notes
The title of this page comes from a contentbox. After deployment, the contentbox on the page has to be edited, to give the page a title and to give the user information about how to get access to the 3D-printing room.
The FAQ page (https://makentnu.no/en/faq/) and the 3D printing room paragraph on the About page (https://makentnu.no/en/makerspace/) should also be updated to include links to the new 3D printing room access page.
Checklist
(If any of the points are not relevant, mark them as checked)
makemigrations
,makemessages
andcompilemessages
management commands and committed any changes that should be included in this PR