Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expression editing in grid row/column controls (#6396)
**Problem:** Instead of showing the generated rows/columns in the inspector, show the values from templates directly, and allow expression editing there. This means `repeat` expression affect multiple generated rows, and this is displayed in the row's label: <img width="268" alt="image" src="https://github.com/user-attachments/assets/72fc8932-5191-4df4-b2bc-92ba7575aac9"> **Commit Details:** (< vv pls delete this section if's not relevant) - the logic is much simpler this way, because one control is directly paired with one value from gridTemplateRows/Columns - I could delete `mergeGridTemplateValues`, because the only source of information now are the template row/col values from props - New GridExpressionInput component - Some logic to calculate the control label, because now the generated row/col index can be different from the index of the control itself - changed how rename/delete works, because the index affects the template row/col from the props, not the generated row/col - deleted flex-section.spec.tsx, because it only tested the removed `mergeGridTemplateValues` - Renamed Rows and Columns label to "Template Rows" and "Template Columns" - Removed the ... menu when the input is focused so we have bigger space to edit the expression: ![25-50-i20ib-aftoa](https://github.com/user-attachments/assets/9082bd92-1964-42d0-851f-773aea6e796b) **TODO:** - we don't take gridAutoRows and gridAutoColumns into account at all (needs design) - the control is just an input, we don't show a dropdown to choose from allowed keywords **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Preview mode
- Loading branch information