Artemis
Artemis copied to clipboard
`Programming exercises`: Fix re-rendering of collapsed instructions component
Checklist
General
- [x] This is a small issue that I tested locally and was confirmed by another developer on a test server.
Motivation and Context
It has been noticed that by collapsing and re-expanding the problem statement card in the online editor view, this re-renders differently and moves all testcases to the bottom of the card. (see recording below)
This has been experienced with Chrome and Edge based browsers.
Description
The reason why this happens seems to be related to the *ngIf directive, re-rendering the problem statement when expanded. By replacing this with the [hidden] attribute, this isn't re-rendered anymore as it remains in the DOM.
Steps for Testing
Prerequisites:
- 1 Students
- 1 Programming Exercise
- Log in to Artemis
- Participate to a programming exercise and open it in the online code editor
- Collapse and expand the problem statement on the right
- Check that the problem statement rendering is showed properly
Review Progress
Code Review
- [ ] Review 1
- [ ] Review 2
Manual Tests
- [ ] Test 1
- [ ] Test 2
Test Coverage
| Class/File | Branch | Line |
|---|
Screenshots

I suggest using
*ngIf: https://stackoverflow.com/questions/43034758/what-is-the-difference-between-ngif-and-hidden
ngIf is currently used but leads to the re-rendering issue described above.. I couldn't find an alternative solution or reason why this actually happens.. [hidden] on the other hand keeps the rendering consistent..
Yes :D I should have read the description first :P
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.