-
-
Notifications
You must be signed in to change notification settings - Fork 30
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: change in size GitHub (UX) #89
Comments
Yes, I have noticed this issue as well. I also noticed issues on the issue page...hehe, get it? notice the issue button on the above image. It's not aligned properly. BUT Maybe if we configure tailwind.config.js to match with github's tailwind config or something, we can solve this issue. |
I agree with you on this. Currently, there are 11 components being injected into GitHub, and it would indeed be relatively easy to modify them to use custom CSS classes. However, as the number of components grows, converting them all to custom CSS classes could become more challenging and time-consuming. |
This Stackoverflow question might help, I quickly checked it but did not fully test the situation. |
This looks really promising |
The solution I shared previously resolves the conflict, but since it's adding a prefix to tailwind, the react app gots broken. I researched further and found that we can configure react to add a Some libraries are adding the prefix to Another thing we can do is that since the project is using PostCSS we might add the prefix there. A library to try, PostCSS library, postCSS prefixer, and PostCSS related StackOverFlow Question mentioning the library and showing an example of it. I think the next step here would be trying both solutions,
|
Another possible solution could be creating a shadow dom for each element that is inserted into the page since it will isolate styling from the host page. |
.take |
Hey @marcusgchan, about the use of a shadow DOM.The injected elements inherit some of their styling from GitHub itself. The shadow DOM will obstruct this behaviour. |
I see, didn't realize that it was using some of the styling from GitHub |
I looked at the react-classname-prefix-loader and it seems interesting since it automates the process of adding prefixes during the build phase, but there are a few things that concern me:
It may be easier to manually add the prefix, but then it's a bit tedious to add "tw-" to every class in the future. Any suggestions? |
My suggestion see if there is a modern alternative. Perhaps create a vite plugin. The alternative is creating our own prefixer in the lib folder to make our css collision proof. |
I tried out building the plugin. Prefixing works as we'd expect it to. The problem being, some of our components inherit styling from GitHub using their classnames. Like
ai/src/content-scripts/components/InsightsSelectDropdown/InsightsSelectDropdown.ts Line 12 in e95e7a1
ai/src/content-scripts/components/InsightsSelectDropdown/InsightsSelectDropdown.ts Line 14 in e95e7a1
Prefixing will break this behaviour. |
Describe the bug
When you open GitHub with the extension enabled it resizes the screen and change dimension which is a bit uncomfortable.
Steps to reproduce
www_screencapture_com_2023-5-18_18_12.mp4
Affected services
browser-extension
Platforms
No response
Browsers
No response
Environment
No response
Additional context
No response
Code of Conduct
Contributing Docs
The text was updated successfully, but these errors were encountered: