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

1275 description markdown rendering not working #1297

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

YiranDuan721
Copy link
Contributor

@YiranDuan721 YiranDuan721 commented Jan 8, 2024

Todos

  • Show less according to number of new lines, instead of characters

Screenshots

Before:

image
image

After:

image
image

… less" to avoid confusion. Now the button reads "Show more" when the full description is not shown, and "Show less" when the full description is shown.
@YiranDuan721 YiranDuan721 linked an issue Jan 8, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Jan 8, 2024

Your Testserver will be ready at https://1297.test.live.mm.rbg.tum.de in a few minutes.

Logins
Kurs1 Kurs2 Kurs3 Kurs4
public public loggedin enrolled
prof1 prof1 prof2 prof1
prof2
student1
student2
student3
student1
student2
student2
student3
student1
student2

@YiranDuan721 YiranDuan721 marked this pull request as draft January 9, 2024 09:09
@SebiWrn
Copy link
Contributor

SebiWrn commented Jan 9, 2024

I think there is still a bug if you have a big description:
This is what it looks like with many lines in markdown:
image

I think the description should be way smaller and extend if you press "show more"

@YiranDuan721
Copy link
Contributor Author

I think there is still a bug if you have a big description: This is what it looks like with many lines in markdown: image

I think the description should be way smaller and extend if you press "show more"

Thank you for testing! I think this is because currently whether or not to collapse a long description is based on the total number of characters, not the number of lines. I will fix this further today (hopefully).

@YiranDuan721 YiranDuan721 marked this pull request as ready for review January 10, 2024 14:42
@YiranDuan721
Copy link
Contributor Author

YiranDuan721 commented Jan 10, 2024

I think there is still a bug if you have a big description: This is what it looks like with many lines in markdown: image

I think the description should be way smaller and extend if you press "show more"

This problem should have been resolved in the new commits.

…tion environment, allowing the element's height to be accurately calculated even with blank lines;

Remove debug code.
@YiranDuan721 YiranDuan721 enabled auto-merge (squash) January 10, 2024 15:25
@YiranDuan721 YiranDuan721 merged commit d1d0ddc into dev Jan 11, 2024
8 checks passed
@YiranDuan721 YiranDuan721 deleted the 1275-description-markdown-rendering-not-working branch January 11, 2024 14:01
SebiWrn pushed a commit that referenced this pull request May 7, 2024
* Course description on the watching page: Switch "Show more" and "Show less" to avoid confusion. Now the button reads "Show more" when the full description is not shown, and "Show less" when the full description is shown.

* Change the hidden field containing the video description from input to span to preserve its formatting.

* Collapse video description also when it is too high (more than 1 line of title + 1 line of plain text)

* The hidden element holding the description simulates the real description environment, allowing the element's height to be accurately calculated even with blank lines;
Remove debug code.
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.

Description: Markdown rendering not working
2 participants