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

[Bug] group-tab.html resizing window and overlap issues #3361

Closed
irvinm opened this issue Jul 12, 2023 · 12 comments
Closed

[Bug] group-tab.html resizing window and overlap issues #3361

irvinm opened this issue Jul 12, 2023 · 12 comments
Labels
bug Firefox-issue bug of Firefox itself

Comments

@irvinm
Copy link
Contributor

irvinm commented Jul 12, 2023

Abstract

On group-tab.html, when having more tabs than a column can handle, the relationship between UL and LI elements sometimes causes the different sections to overlap.

image

Steps to reproduce

  1. Start with a fresh profile
  2. Install TST
  3. Create many tabs with a few in a tree
  4. Resize the window vertically and see overlapping tab information

I suspect this is related to the space at the bottom of the previous column. The most overlap in the 2nd column is when the free space of the previous one is at its largest. I do not believe this is a new bug, but has existed for quite some time.

Expected result

Regardless of the window height, none of the tab lines should be any closer to overlapping.

Actual result

Notice the overlap examples in columns 2 and 3.

2023-07-12_13-12-29.mp4

Environment

  • Platform (OS): Windows 10 Pro 2H22
  • Version of Firefox: 115.0.2
  • Version (or revision) of Tree Style Tab: 3.9.15
@piroor
Copy link
Owner

piroor commented Jul 13, 2023

Thanks! This looks to be a bug of Firefox itself so I've reported it to bugzilla.mozilla.org.

1843228 - Boxes are unexpectedly overlapped with a combination of CSS flexbox and CSS multi-column layout

@piroor piroor added Firefox-issue bug of Firefox itself and removed needs-triage labels Jul 13, 2023
@Arthaey
Copy link

Arthaey commented Dec 5, 2023

I'm see a similar overlap in the sidebar for some of my collapsed trees. Is this the same Firefox bug, or something different?

Screen Shot 2023-12-05 at 10 00 44 AM

@irvinm
Copy link
Contributor Author

irvinm commented Dec 8, 2023

@Arthaey, you obviously have some CSS at work there. Can you reproduce the overlap without any CSS applied in the sidebar?

@piroor
Copy link
Owner

piroor commented Dec 11, 2023

1744363 - Firefox print preview and resulting print out are truncating the last few table rows contained in div (the bug I filed was resolved as a duplication of it) is fixed at Firefox 122, thus I close this.

@piroor piroor closed this as completed Dec 11, 2023
@irvinm
Copy link
Contributor Author

irvinm commented Jan 23, 2024

@piroor I re-tested this with FF122 and it is MUCH better now with the Firefox changes.

However, there does seem to be 1 edge case and I am not sure if it is Firefox related or TST related. Whenever there is a virtual folder inside another folder, the favico for the nested folder does not stay locked to the name. This seems to be the only scenario that doesn't work at this point.

In this example, watch the folder "Sort Me" at the top of the 2nd column. I am just resizing the window to show the changes.

2024-01-23.10-43-11a.mp4

@piroor
Copy link
Owner

piroor commented Jan 24, 2024

Hmm... I cannot reproduce the problem exact same to yours. But I saw similar odd rendering:
image
The small black line is the bottom edge of the "globe" icon. I've inspected it with the DOM inspector and I've realized that Firefox renders an icon as two parts.
image

@piroor
Copy link
Owner

piroor commented Jan 24, 2024

TST's built-in icons like "folder", "globe" and so on are regularly rendered as "colored box, clipped with SVG mask", to render icons with arbitrary color. Firefox looks to be able to render such a box as sliced parts. On the other hand, favicons of webpages are rendered as an <img> HTML element, and Firefox looks to prevent sliced rendering for such an embedded image.

@irvinm
Copy link
Contributor Author

irvinm commented Jan 24, 2024

Thanks for checking on this. I see what you are saying and I see the same sliced parts as well with the built-in icons. I guess I could add a comment to the original Mozilla bug to see if anything happens. Regardless, things are much better now.

Thanks again.

image

image

@irvinm
Copy link
Contributor Author

irvinm commented Jan 24, 2024

I opened a new bug on this ... https://bugzilla.mozilla.org/show_bug.cgi?id=1876348

Below is what they said ... the "break-inside:avoid" sounds interesting. I'll see if I can test that.


Thanks for the report! It is good to know bug 1744363 helps.

"TST's built-in icons like "folder", "globe" and so on are regularly rendered as "colored box, clipped with SVG mask", to render icons with arbitrary color. Firefox looks to be able to render such a box as sliced parts. On the other hand, favicons of webpages are rendered as an <img> HTML element, and Firefox looks to prevent sliced rendering for such an embedded image."

Without a testcase showing the issue, it is hard for me to know exactly the problem. However, with the description above and the observation of the video, I guess the built-in icon is a <div>, and Firefox can slice it across the column boundary. For <img> and text, Firefox treats them as monolithic elements, and won't slice it; if they are not fit in current column, it will be pushed to next column.

If you still have access to the testcase, could you try if adding break-inside:avoid [1] to the built-in icon makes any difference? An alternative idea is to add break-inside:avoid to the box that contains the built-in icon and the text.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/break-inside

@irvinm
Copy link
Contributor Author

irvinm commented Jan 24, 2024

Looks like at a minimum, we can apply some CSS to avoid this situation. I was able to successfully keep the default icon from slicing and the icon and label together all by applying "break-inside:avoid" to the "li". I updated this information in the defect as well. Not sure if they will want to do anything else on their end, but at least there is a workaround.

CSS

Applying it to just the icon itself prevented it from slicing, but I was able to get the icon and label to split from each other.

break-inside

@irvinm
Copy link
Contributor Author

irvinm commented Jan 25, 2024

They have closed the issue on their end which is what I kind of expected given the specific situation.

@piroor
Copy link
Owner

piroor commented Jan 25, 2024

I've changed to set the break-inside:avoid to the icon itself. ( dc3b45b )
The still-appearing problem (icon and label are shown in different columns) on your environment can be triggered by a difference around font rendering system or the font itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Firefox-issue bug of Firefox itself
Projects
None yet
Development

No branches or pull requests

3 participants