Feat: new labextension - #385
nadjajovancevic wants to merge 48 commits into
Conversation
…ts without a group
…lecture-view # Conflicts: # packages/labextension/src/app/components/grader-service/assignments/assignment-group.tsx # packages/labextension/style/css/output.css
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
natkam
left a comment
There was a problem hiding this comment.
I've had a look at the hooks and left a few questions/suggestions. Maybe some of them will be relevant (;
| const diffTime = Math.abs( | ||
| props.endDate.getTime() - props.startDate.getTime() | ||
| ); | ||
| return Math.ceil(diffTime / (1000 * 60 * 60 * 24)); |
There was a problem hiding this comment.
I'm not sure if this matters (I haven't yet found where this function is used, sorry), but is it supposed to return the difference in days between two dates (e.g.: from today to tomorrow, it'd be 1 day; from Mon. to Fri., it'd be 4 days), or two times (e.g. from today midday to tomorrow 1 p.m., it'd be 2 days)? Right now, it does the latter.
Just making sure that this is what you intended :)
There was a problem hiding this comment.
I actually wanted to update it so it shows the difference in hours and minutes as well, so I will definitely change this!
| await deleteAssignment(variables.lectureId, variables.assignmentId); | ||
| }, | ||
| onSuccess: async (data, variables) => { | ||
| await queryClient.invalidateQueries({ |
There was a problem hiding this comment.
I read on the internet that await-ing invalidateQueries is not necessarily good, because it actually blocks UI updates. (But tbh, I'm not sure if our use case is the same as in the article - maybe you know better that we want to await actually?)
(I think queryClient.invalidateQueries is await-ed everywhere in the hooks, so this comment also applies to other occurrences.)
There was a problem hiding this comment.
Good point, the question is what we actually want. If we remove async, then UI will update a bit inconsistently, since for example the dialog will close and only then the new data is fetched and the UI is updated. But this happens already anyway since we omitted mutateAsync. So we either go back to mutateAsync and have more verbose code, or we keep this and allow for a small time-lag on UI updates. What do you think?
There was a problem hiding this comment.
Now, for questions about UX I'm definitely out of my depth haha! I'd have to see how it looks in reality, I think. Not sure if that small lag is even worth bothering in our case...
natkam
left a comment
There was a problem hiding this comment.
A few more minor things that caught my eye.
| @@ -6,20 +6,21 @@ | |||
| "esModuleInterop": true, | |||
| "incremental": true, | |||
| "jsx": "react", | |||
| "lib": ["DOM", "ES2020"], | |||
| "lib": ["DOM", "ES2019", "ES2020.Intl"], | |||
| "module": "esnext", | |||
| "moduleResolution": "node", | |||
There was a problem hiding this comment.
If I understood it correctly, "node" is for old version of Node, and we probably want "node16"/"nodenext" or "bundler".
| "noUnusedLocals": true, | ||
| "preserveWatchOutput": true, | ||
| "resolveJsonModule": true, | ||
| "outDir": "lib", | ||
| "rootDir": "src", | ||
| "strict": true, | ||
| "strictNullChecks": false, | ||
| "skipLibCheck": true, | ||
| "target": "ES2020", |
There was a problem hiding this comment.
This seems inconsistent, here we have target "ES2020", but earlier we set "lib": ["DOM", "ES2019", "ES2020.Intl"].
Co-authored-by: Natalia Maniakowska <3858688+natkam@users.noreply.github.com>
natkam
left a comment
There was a problem hiding this comment.
okay, then let's merge this one, and I'll next have a look at the other PR :)
* Fix: show "ungrouped assignments" group only when there are assignments without a group * WIP: add assignment count to each group * WIP: adjust release dialog for multiple assignments * fix: change unrelease success message * WIP: show appropriate icon and message when there are no assignments * WIP: gray out the text when assignment is completed * chore: remove redundant data type declaration * chore: add new lecture to the dev token config * refactor: remove filterGroups and adjust filters' structure * WIP: add "create another" checkbox to create assignment dialog * fix: use mutate instead of mutateAsync in assignment hooks * fix: adjust empty states for dashboard and lecture pages * fix: remove focus and active input styling from InputGroupInput * fix: align button correctly * fix: adjust recalc scores dialog's layout * fix: pass recalc-scores flag to updateAssignment mutation * chore: clean up styling files * fix: change input time formatting Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Check if lectures have been fetched Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: always pass an empty string for className prop * fix: remove circular dependency * fix: add/change key prop * fix: remove async/await keywords from mutation handlers * chore: use correct operational signs * Check if optional props are present Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: remove await from `invalidateQueries` in hooks --------- Co-authored-by: Nadja Jovancevic <e12121824@student.tuwien.ac.at> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* chore: remove old/unused dependencies * chore: update tanstack form version to 1.33.5 --------- Co-authored-by: Nadja Jovancevic <e12121824@student.tuwien.ac.at>
…release them in one
…onal-features-dialog-overflow fix: overflowing text for release, delete, edit dialogs
…-Wien-dataLAB/grader-service into feat/lecture-view-additional-features
…b.com/TU-Wien-dataLAB/grader-service into feat/lecture-view-additional-features # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…-Wien-dataLAB/grader-service into feat/lecture-view-additional-features
…onal-features
Additional features:
collapsible groups
global release button
Fixes:
- combobox in create/edit assignment dialog works as expected: users can remove the group after it's been selected
- late submissions' field in create/edit assignment dialog: the entries are being removed as expected
- refactoring
Code migration from GitLab.