Skip to content

Add dynamic CSS "empty" disclaimer to all datagrids#2704

Open
niklasmohrin wants to merge 3 commits intoe-valuation:mainfrom
niklasmohrin:empty-table-css
Open

Add dynamic CSS "empty" disclaimer to all datagrids#2704
niklasmohrin wants to merge 3 commits intoe-valuation:mainfrom
niklasmohrin:empty-table-css

Conversation

@niklasmohrin
Copy link
Copy Markdown
Member

Closes #2662

I made two separate commits, the first has the meaningful changes and the second fixes the indentation.

Copy link
Copy Markdown
Member

@janno42 janno42 left a comment

Choose a reason for hiding this comment

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

I can see the 🎆

Comment thread evap/staff/templates/staff_questionnaire_index.html Outdated
Comment thread evap/evaluation/templates/profile.html
@niklasmohrin
Copy link
Copy Markdown
Member Author

niklasmohrin commented Apr 20, 2026

Waiting for #2587 to spare them the rebase

@niklasmohrin
Copy link
Copy Markdown
Member Author

I think we are running into a firefox bug on the questionnaire index. The first time (per tab) that I filter for something, if it matches nothing (i.e. you have to enter something like adljaladljad right away without a table update from a prefix), the disclaimer does not show up. The disclaimer shows up if:

  1. this is not the first time that the table contents change
  2. the table is initially empty (for example reload page with something in search box)

It does work again if you remove the filter, switch to another questionnaire tab, and enter alkjhdf again. Very strange. In chromium everything works as expected

@niklasmohrin
Copy link
Copy Markdown
Member Author

niklasmohrin commented Apr 24, 2026

Oh, I can also get it to break in other places. Semester view, enter something that doesn't match anything (evaluation or course list, doesn't matter). Reload page. Empty table, no disclaimer. Funnily enough, this is exactly the opposite of when it breaks on the questionnaire page

@niklasmohrin
Copy link
Copy Markdown
Member Author

Probably firefox is tripping up with our table contents remove and append here

protected renderToDOM() {
[...this.container.children].map(element => element as HTMLElement).forEach(element => element.remove());
const elements = this.rows.filter(row => row.isDisplayed).map(row => row.element);
this.container.append(...elements);
this.saveStateToStorage();
}
and fails to apply CSS rules?

@fekoch
Copy link
Copy Markdown
Collaborator

fekoch commented Apr 27, 2026

Oh, I can also get it to break in other places. Semester view, enter something that doesn't match anything (evaluation or course list, doesn't matter). Reload page. Empty table, no disclaimer. Funnily enough, this is exactly the opposite of when it breaks on the questionnaire page

Interesting, I can reproduce it, but not consistently. When reloading multiple times, the notice sometimes shows and sometimes is missing.

Additionally, I can not reproduce it, if I have my devtools open 🙃 ...

@fekoch
Copy link
Copy Markdown
Collaborator

fekoch commented Apr 27, 2026

I opened a ticket at bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=2035307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Use CSS for "no matching entries" tables

4 participants