Comments (8)
I dug into this behavior a bit today. It looks like what's happening is the effective "min width" of the content changes from 959px to 511px as you shrink the viewport. When that switch happens, the pane expands to fill the space. I'd love to get some design input on what the expected behavior should be here. I'm going to move this back to the inbox so we can discuss in the next maintainer sync.
from components.
@jdrush89 Are there any places in the GitHub UI where this behavior is causing issues? Seeing a real-world example would help us decide on what the correct behavior should be and what the priority of this issue is.
from components.
@colebemis I believe that if a user resizes the pane, that size should remain the same even if the viewport changes until it hits a responsive breakpoint that would control visibility (like if it then stacks, the width would be full).
from components.
@colebemis yes, you can see it on the codeview if you expand the tree on a wide screen, then shrink the window size.
Here's a repro on https://github.com/github/github/tree/master/.devcontainer
Edit: it seems like uploading videos to issues isn't working right now, but I'll attach whenever it's fixed.
from components.
I don't know what is wrong with issues, but I still can't attach videos. Zach has one on slack if that's helpful.
https://github-grid.enterprise.slack.com/files/UM038LRNF/F05BYRDLM08/funny-tree-view-panel.mov
from components.
Finally got it
https://github.com/primer/react/assets/955442/33b7cb9b-8a7d-4914-ae11-ddd5de5de137
from components.
Ah, I see. Thanks for the video @jdrush89. @langermank and I did some investigation into this issue and it's trickier than we expected to fix it. I spoke with @lesliecdubs and we both agree that this is a low priority bug since not many people resize their browser windows.
If your main concern is that the min width of the main content is too narrow at small viewports, that can be adjusted here:
react/src/PageLayout/PageLayout.tsx
Line 746 in 58b118f
from components.
Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.
from components.
Related Issues (20)
- TreeView: Add support for external styling HOT 3
- TexInput `onClick` focus behavior broken with `type=date` on Safari
- `Dialog` should allow wrapping content, header, and footer (for example in `Suspense` or some context) HOT 2
- Utils should be exported
- Tests: Remove redundant ThemeProvider from tests
- `DialogV2` has incorrect names for width values HOT 1
- Enhancement: Add support for flush action lists HOT 2
- Update docs for `Button` to not consider `count` as required HOT 1
- Release Tracking
- Using `TooltipV2` always sets aria associations on first child element HOT 11
- [Tests] Ensure that axe calls are made on open state of the component HOT 4
- [TreeView] Add area for `dragHandle` to be shown before the expand/collapse toggle HOT 1
- Release Tracking
- `Stack` `justify` prop has no effect HOT 4
- SelectPanel2 Optimization: Do not add and remove keydown listener for escape key on every render HOT 1
- `Stack` `gap` is overridden on wider layouts
- Release Tracking
- Portal Hardcoded Z-Index Buries Components HOT 1
- Consider modern `moduleResolution`
- Data Table Pagination - when the page numbers in the 1000s the page numbers are unreadable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from components.