Skip to content

Feat: new labextension - #385

Draft
nadjajovancevic wants to merge 48 commits into
release-0.12.6from
feat/new-labextension
Draft

nadjajovancevic wants to merge 48 commits into
release-0.12.6from
feat/new-labextension

Conversation

@nadjajovancevic

Copy link
Copy Markdown
Contributor

Code migration from GitLab.

@nadjajovancevic
nadjajovancevic requested a review from natkam July 30, 2026 10:27

@natkam natkam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's merge it, I guess?

@nadjajovancevic
nadjajovancevic marked this pull request as draft August 4, 2026 09:06
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@natkam natkam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've had a look at the hooks and left a few questions/suggestions. Maybe some of them will be relevant (;

Comment thread packages/labextension/src/app/hooks/assignment/assignment-create-hook.tsx Outdated
const diffTime = Math.abs(
props.endDate.getTime() - props.startDate.getTime()
);
return Math.ceil(diffTime / (1000 * 60 * 60 * 24));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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...

Comment thread packages/labextension/src/app/hooks/assignment/assignment-create-hook.tsx Outdated

@natkam natkam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few more minor things that caught my eye.

Comment thread packages/labextension/src/services/file.service.ts
@@ -6,20 +6,21 @@
"esModuleInterop": true,
"incremental": true,
"jsx": "react",
"lib": ["DOM", "ES2020"],
"lib": ["DOM", "ES2019", "ES2020.Intl"],
"module": "esnext",
"moduleResolution": "node",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>
@nadjajovancevic

Copy link
Copy Markdown
Contributor Author

@natkam I will implement all further changes on #386

@natkam natkam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

okay, then let's merge this one, and I'll next have a look at the other PR :)

szebiniso-tuwien and others added 21 commits August 10, 2026 16:19
* 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>
…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
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.

3 participants