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

Fix Grid Track Labels and Resize Indicators #6566

Merged
merged 5 commits into from
Oct 18, 2024
Merged

Conversation

balazsbajorics
Copy link
Contributor

@balazsbajorics balazsbajorics commented Oct 18, 2024

Problem:

The grid labels and the grid resize indicators are in a state of being fucked:
image
image
image

Goal:

Fix the various layout issues, and make the labels subdued until hovered. The hovered label should z-index over its siblings:
image

Fix:

image

image

Commit Details:

  • Split GridResizingControl into GridTrackSizeLabelForDimension and GridResizingStripedIndicator
  • Render two helper grids, one for the label and one for the sizing indicator. This avoids future css intermingling problems, going forward bug fixing one should not meaningfully affect the other.
  • The helper grids use the blessed getGridHelperStyleMatchingTargetGrid style instead of manually picking an assortment of relevant grid properties. This simplifies our life 97%

Note:
The code could be further simplified, as this is now a copy-paste job. I tried to remove the obviously unnecessary things, but there's still a little too much div wrappers going on.

Manual Tests:
I hereby swear that:

  • I opened a hydrogen project and it loaded
  • I could navigate to various routes in Play mode

Copy link
Contributor

github-actions bot commented Oct 18, 2024

Try me

Copy link

relativeci bot commented Oct 18, 2024

#14869 Bundle Size — 57.98MiB (~+0.01%).

3e57c79(current) vs 916e8b9 master#14866(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#14869
     Baseline
#14866
Regression  Initial JS 40.97MiB(~+0.01%) 40.97MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 18% 17.88%
No change  Chunks 20 20
No change  Assets 22 22
No change  Modules 4153 4153
No change  Duplicate Modules 213 213
No change  Duplicate Code 27.33% 27.33%
No change  Packages 477 477
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#14869
     Baseline
#14866
Regression  JS 57.97MiB (~+0.01%) 57.97MiB
Improvement  HTML 7.37KiB (-0.25%) 7.39KiB

Bundle analysis reportBranch fix/grid-labelsProject dashboard


Generated by RelativeCIDocumentationReport issue

@balazsbajorics balazsbajorics merged commit 40c535a into master Oct 18, 2024
15 checks passed
@balazsbajorics balazsbajorics deleted the fix/grid-labels branch October 18, 2024 12:57
liady pushed a commit that referenced this pull request Dec 13, 2024
# **Problem:**
The grid labels and the grid resize indicators are in a state of being
fucked:

![image](https://github.com/user-attachments/assets/e68f433a-93e5-4f3a-92c7-a53764357651)

![image](https://github.com/user-attachments/assets/d2347204-9ae4-48de-bc5f-31592f81e751)

![image](https://github.com/user-attachments/assets/c0105ee6-793e-48d1-b68b-b2f9eb6f64e2)

# **Goal:**
Fix the various layout issues, and make the labels subdued until
hovered. The hovered label should z-index over its siblings:

![image](https://github.com/user-attachments/assets/52b0f170-6d6b-4fed-8290-1eb6f9a022c8)

# **Fix:**
<img width="566" alt="image"
src="https://github.com/user-attachments/assets/ade0a053-321f-438c-a9e2-d8538f5be293">


![image](https://github.com/user-attachments/assets/9cb73a40-b205-45c8-a43f-2f1aae5ff6bf)



**Commit Details:**

- Split `GridResizingControl` into `GridTrackSizeLabelForDimension` and
`GridResizingStripedIndicator`
- Render _two_ helper grids, one for the label and one for the sizing
indicator. This avoids future css intermingling problems, going forward
bug fixing one should not meaningfully affect the other.
- The helper grids use the blessed
`getGridHelperStyleMatchingTargetGrid` style instead of manually picking
an assortment of relevant grid properties. This simplifies our life 97%

**Note:**
The code could be further simplified, as this is now a copy-paste job. I
tried to remove the obviously unnecessary things, but there's still a
little too much div wrappers going on.

**Manual Tests:**
I hereby swear that:

- [ ] I opened a hydrogen project and it loaded
- [ ] I could navigate to various routes in Play mode
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.

3 participants