Skip to content
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

Use bootstrap grid for staff evaluation #1889

Merged
merged 11 commits into from
Nov 20, 2023

Conversation

FranzSw
Copy link
Collaborator

@FranzSw FranzSw commented Feb 27, 2023

This is the "low-effort" version high-effort approach, using bootstrap classes. This works well, however, aligning the columns to be the same size is not really possible with the default classes (atleast I didnt find the ones with the right width for this table). With dynamic sizing, this only shifts the second title "Entscheidung" to the right.

Before:
image
After:
image

closes #1818

Copy link
Member

@richardebeling richardebeling left a comment

Choose a reason for hiding this comment

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

Code looks good to me, screenshot is fine, haven't tested manually.

@richardebeling richardebeling requested a review from janno42 March 13, 2023 17:55
Copy link
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.

The problem is that all rows, including the header, are sized independently. If the edit button column would have a header text, the layout would break. Also, if in some rows the button group would be smaller, the edit button would move to the right and also break the layout.
The current approach is probably not what we should use. Do you have any further ideas?

@FranzSw
Copy link
Collaborator Author

FranzSw commented May 15, 2023

@janno42 Now its not a bootstrap grid anymore, but the "datagrid", which is also used for e.g. the grades semester view. It should allow for absolute / equal sizing of all columns.

@FranzSw FranzSw force-pushed the replace-textanswer-review-html-table branch from 9026978 to 909e4b4 Compare May 15, 2023 18:45
Copy link
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 pushed a commit with suggestions for less padding into your branch. Before there was a lot of empty space.

Is there a way to use min-content for the last three columns' widths? It would be perfect if we don't have to specify their individual widths.

@@ -2,6 +2,11 @@
background-color: $table-striped-bg;
}

// CSS Grid needs it the exact other way around as the title also has the row class
Copy link
Member

Choose a reason for hiding this comment

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

are you missing a word here? this comment is hard to read.

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

As discussed, we could move the padding (and other classes) into the scss, making it easier to work with the template. I pushed a suggestion, what do you think of it?

When testing, I noticed that the original textanswer after editing is not correctly placed. It should be under the new answer, not beside it. Can you please have a look into it?

@FranzSw
Copy link
Collaborator Author

FranzSw commented Aug 28, 2023

@janno42 Original textanswer should now be shown below the new one :)

@niklasmohrin niklasmohrin requested a review from janno42 September 3, 2023 21:43
Copy link
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.

✔️ Meets requirements
✔️ UI functionality checked

Copy link
Member

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

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

Some final thoughts, nothing crucial, but I would prefer to have a short discussion to be on the same page about each of the points before merging

evap/static/scss/components/_grid.scss Outdated Show resolved Hide resolved
evap/static/scss/components/_grid.scss Show resolved Hide resolved
evap/static/scss/components/_grid.scss Outdated Show resolved Hide resolved
evap/static/scss/components/_grid.scss Show resolved Hide resolved
- rename grid-row template to table-grid
- move classes to scss
- use border-bottom
@niklasmohrin niklasmohrin requested a review from janno42 November 6, 2023 17:39
Copy link
Member

@niklasmohrin niklasmohrin left a comment

Choose a reason for hiding this comment

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

Thanks :)

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

wonderful :)

@janno42 janno42 merged commit 42c6df4 into e-valuation:main Nov 20, 2023
10 checks passed
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.

Replace textanswer review HTML table with CSS grid
4 participants