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

Rework ListItem layout and add ListLink component #1819

Merged
merged 4 commits into from
Jan 9, 2025

Conversation

blammit
Copy link
Contributor

@blammit blammit commented Jan 7, 2025

No description provided.

@blammit
Copy link
Contributor Author

blammit commented Jan 7, 2025

@mr-manuel can you try this out and see if it is suitable?

Copy link
Contributor

@MikeTrahearn-Qinetic MikeTrahearn-Qinetic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General note: the layout strategy is very complex using anchors, spacing properties from numerous places. Perhaps this is just legacy, but I'm left wondering as to the general state of the design if it this complex.

components/listitems/ListLink.qml Show resolved Hide resolved
components/listitems/ListLink.qml Show resolved Hide resolved
components/listitems/ListLink.qml Outdated Show resolved Hide resolved
components/listitems/core/ListItem.qml Show resolved Hide resolved
pages/settings/debug/PageSettingsDemo.qml Outdated Show resolved Hide resolved
themes/geometry/FiveInch.json Show resolved Hide resolved
@blammit blammit force-pushed the blam/link-component branch from 4092b36 to 9c088ce Compare January 8, 2025 03:55
@blammit
Copy link
Contributor Author

blammit commented Jan 8, 2025

General note: the layout strategy is very complex using anchors, spacing properties from numerous places. Perhaps this is just legacy, but I'm left wondering as to the general state of the design if it this complex.

The layouts of list items can certainly be improved now that we have ported all of the settings from gui-v1 and have a better idea of the different layouts that are required. Ideally the spacing/margins would be consolidated to have a common set across the board, instead of having highly customized values for different items.

Allow the bottom content horizontal sizing to be customized:

- 'stretch' size mode: bottom content spans the full width of the list
item (as per existing behavior).
- 'compact' size mode: the bottom content spans from the list item's
left side, to the edge of the item's right-hand content.

The 'compact' size is useful if the right-hand content is taller than
the primaryLabel text; in this case, the caption text should wrap at
the edge of the right-hand content, instead of dropping below it.

Use a GridLayout with row and column spans to make this layout more
easily configurable.

Part of #1811
These are no longer needed. The 'spacing' was confusing in any case
because there are multiple types of spacing within ListItem.
@blammit blammit force-pushed the blam/link-component branch from 9c088ce to 8edf37c Compare January 8, 2025 04:19
@MikeTrahearn-Qinetic MikeTrahearn-Qinetic merged commit cb5e383 into main Jan 9, 2025
2 checks passed
@MikeTrahearn-Qinetic MikeTrahearn-Qinetic deleted the blam/link-component branch January 9, 2025 03:55
@mr-manuel
Copy link
Collaborator

@blammit I was now able to test it. Looks good, thanks!

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