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

Some text in the wiki overlay overlaps #13310

Open
Tracked by #3504
mouzedrift opened this issue Jun 2, 2021 · 6 comments
Open
Tracked by #3504

Some text in the wiki overlay overlaps #13310

mouzedrift opened this issue Jun 2, 2021 · 6 comments
Labels
area:overlay-wiki osu!framework issue Can't resolve this without changes to osu!framework. priority:3 Nice to have, at some point type:cosmetic

Comments

@mouzedrift
Copy link
Contributor

Describe the bug:
some text in the wiki pages overlaps

Screenshots or videos showing encountered issue:
visual settings page:
image

multi page:
osu!_vsxkgyMSGq

osu!lazer version:
2021.602.0

@frenzibyte frenzibyte added area:overlay-wiki type:cosmetic priority:1 Very important. Feels bad without fix. Affects the majority of users. labels Jun 2, 2021
@frenzibyte
Copy link
Member

For reference, this is how they look in osu!web:

Visual settings page:
image

Multi page:
image

@gagahpangeran
Copy link
Contributor

After initial investigation the text flow TotalTextWidth and the table cell ContentWidth is right. There may be something wrong when calculating the grid cell dimension in framework side.

https://github.com/ppy/osu-framework/blob/5835bb8310fb4e0348d5abef752f6d477356998a/osu.Framework/Graphics/Containers/Markdown/MarkdownTable.cs#L91

@smoogipoo
Copy link
Contributor

Quite likely. If you're able to test with a local framework, try applying the following change:

diff --git a/osu.Framework/Graphics/Containers/Markdown/MarkdownTable.cs b/osu.Framework/Graphics/Containers/Markdown/MarkdownTable.cs
index 3bc86b2239..7299fa580b 100644
--- a/osu.Framework/Graphics/Containers/Markdown/MarkdownTable.cs
+++ b/osu.Framework/Graphics/Containers/Markdown/MarkdownTable.cs
@@ -24,8 +24,8 @@ public class MarkdownTable : CompositeDrawable
 
         private readonly Table table;
 
-        private readonly LayoutValue columnDefinitionCache = new LayoutValue(Invalidation.DrawSize, conditions: (s, _) => s.Parent != null);
-        private readonly LayoutValue rowDefinitionCache = new LayoutValue(Invalidation.DrawSize, conditions: (s, _) => s.Parent != null);
+        private readonly LayoutValue columnDefinitionCache = new LayoutValue(Invalidation.DrawSize, InvalidationSource.Default | InvalidationSource.Child, conditions: (s, _) => s.Parent != null);
+        private readonly LayoutValue rowDefinitionCache = new LayoutValue(Invalidation.DrawSize, InvalidationSource.Default | InvalidationSource.Child, conditions: (s, _) => s.Parent != null);
 
         public MarkdownTable(Table table)
         {

@gagahpangeran
Copy link
Contributor

Still happen.

Screenshot from 2021-06-03 11-29-35

@peppy peppy added the osu!framework issue Can't resolve this without changes to osu!framework. label Jun 3, 2021
@gagahpangeran
Copy link
Contributor

Update for this.

This happen because totalWidth of the table is more than its DrawWidth, so the column dimension change from absolute to relative in this code.

https://github.com/ppy/osu-framework/blob/bf3b398128562782bd822a1d47fd468eb323d683/osu.Framework/Graphics/Containers/Markdown/MarkdownTable.cs#L117-L122

Now, because the column width is changed to relative, each column width is columnWidths[i] / totalWidth. This can make the width of the column is less than the width of its content.

It's not a problem if the content is plain text flow because it can wrap. But it's a problem with inline code and emphasis text, like in OP, because they can't wrap, so the content is overflow.

I'm not sure how to approach this issue.

@smoogipoo
Copy link
Contributor

smoogipoo commented Jun 3, 2021

I think the fix is making the framework support wrapping in nested TFCs.

The bigger question I have is how that's going to support backgrounds, because for example web displays the corner radius as:

 /--------|
| line 1  |
 \--------|
|--------\
| line 2  |
|--------/

Not sure on the solution yet, but I suspect adding support for nested TFCs is not enough by itself.

@smoogipoo smoogipoo added priority:3 Nice to have, at some point and removed priority:1 Very important. Feels bad without fix. Affects the majority of users. labels Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:overlay-wiki osu!framework issue Can't resolve this without changes to osu!framework. priority:3 Nice to have, at some point type:cosmetic
Projects
None yet
Development

No branches or pull requests

5 participants