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

Add precise resizing mode for card inside section #22366

Merged
merged 8 commits into from
Oct 30, 2024
Merged

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Oct 14, 2024

Breaking changes

The layout options as changed for multiple reasons :

  • Only grid layout is supported for now so we don't really need a generic object for layout options.
  • simplify the YAML config with shorter property names
  • check if a card is using a legacy size (4 column based) to migrate it.

As the result of this change, there will be not breaking change for users using sections.

Old config

layout_options:
  grid_columns: 1
  grid_rows: 2

New config

grid_options:
  columns: 3 # Multiplied by 3 to have the same size at the end.
  rows: 2 # Row is unchanged

Proposed change

Use 12 columns layout for card resizing. It will allow the usage of 6 button card in on row or 3 vertical tiles one next to each other.
The editor will still display 4 columns by default as it's the more common use-case.

Screenshots

Section

CleanShot 2024-10-14 at 18 36 33

Editor (precise mode disabled)

CleanShot 2024-10-14 at 18 41 03

Editor (precise mode enabled)

CleanShot 2024-10-14 at 18 36 55

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@piitaya piitaya marked this pull request as draft October 14, 2024 16:41
@piitaya piitaya force-pushed the grid_12_columns_grid branch from 4993e0d to 340c718 Compare October 14, 2024 17:03
@piitaya piitaya marked this pull request as ready for review October 16, 2024 08:19
@piitaya piitaya force-pushed the grid_12_columns_grid branch from 340c718 to 41d98e1 Compare October 16, 2024 13:44
@piitaya piitaya mentioned this pull request Oct 25, 2024
9 tasks
@piitaya piitaya force-pushed the grid_12_columns_grid branch from 41d98e1 to 7dfff8e Compare October 25, 2024 16:12

This comment was marked as off-topic.

@piitaya piitaya force-pushed the grid_12_columns_grid branch from 7dfff8e to e7083b2 Compare October 25, 2024 16:14
@piitaya piitaya force-pushed the grid_12_columns_grid branch from e7083b2 to d983a5f Compare October 30, 2024 08:29
@MindFreeze MindFreeze self-requested a review October 30, 2024 10:07
MindFreeze
MindFreeze previously approved these changes Oct 30, 2024
@silamon silamon added the Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label Oct 30, 2024
silamon
silamon previously approved these changes Oct 30, 2024
@piitaya piitaya enabled auto-merge (squash) October 30, 2024 13:30
@piitaya piitaya merged commit c0ca7e4 into dev Oct 30, 2024
11 checks passed
@piitaya piitaya deleted the grid_12_columns_grid branch October 30, 2024 13:35
@Madelena
Copy link
Contributor

Amazing! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed hacktoberfest Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants