Skip to content

Homeview masonary to sections - #247

Merged
DigiLive merged 42 commits into
mainfrom
homeview-masonary-to-sections
Mar 22, 2026
Merged

Homeview masonary to sections#247
DigiLive merged 42 commits into
mainfrom
homeview-masonary-to-sections

Conversation

@DigiLive

@DigiLive DigiLive commented Aug 5, 2025

Copy link
Copy Markdown
Owner

Feature Pull Request

Thank you for contributing to the project!
Please fill out the following information to help us review your pull request.


Feature Summary

Updates view creation to leverage sections for improved layout control, especially on the home view.
The home view now uses a grid layout via sections.


Motivation and Context

This change makes it easier to create complex layouts and improves responsiveness.
Previously, the card creation logic was embedded directly within each view, leading to code duplication and difficulty in customizing layouts.

The changes introduce the concept of sections, which are distinct areas within a view that can contain multiple cards.
The home view is updated to use sections for the persons, areas, and quick access cards.
This makes it easier to create responsive layouts that adapt to different screen sizes.


List of Changes

  • The home view now uses a grid layout via sections.

Wiki Updates

The documentation still has to be updated to reflect this PR because it includes PR #246.
Also the the Home view looks different now, so images have to be updated.


Agreements

Please confirm the following by inserting an x between the brackets:

  • My code adheres to the contribution guidelines of the project.
  • My changes generate no new warnings.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.

Depends on #246

@DigiLive DigiLive added the enhancement New feature or request label Aug 5, 2025
@DigiLive
DigiLive force-pushed the homeview-masonary-to-sections branch from 421de8c to 2de5c16 Compare September 1, 2025 08:13
The branch is rebased onto `main` branch.
At `main`, badges where still called chips.

Changes to `SwitchChip.ts` are applies to `SwitchBadge.ts` in this
commit.
@DigiLive DigiLive self-assigned this Sep 1, 2025
@DigiLive
DigiLive requested a review from AalianKhan September 1, 2025 08:29
@DigiLive

DigiLive commented Sep 1, 2025

Copy link
Copy Markdown
Owner Author

Hi @AalianKhan

Can you please check this PR for any issues.
It changes to layout-mode of the Home view from masonry to sections (See #234).

It should also contain PRs #246 and #254 already.

Comment thread src/views/HomeView.ts Outdated
Comment thread src/views/HomeView.ts Outdated
DigiLive and others added 2 commits October 19, 2025 08:58
Rename all references of "chips" to "badges" across documentation to align
terminology with the current UI and component model. This clarifies options,
examples, and links so users can find and configure badge-related settings
(e.g., extra badges, weather badge) without confusion.
@DigiLive DigiLive added this to the Release v3.0.0 milestone Oct 19, 2025
@DigiLive
DigiLive marked this pull request as ready for review October 19, 2025 08:56
DigiLive and others added 6 commits October 19, 2025 11:08
Updates view creation to leverage sections for improved layout control, especially on the home view.
The home view now uses a grid layout via sections.
This change makes it easier to create complex layouts and improves responsiveness.
Previously, the card creation logic was embedded directly within each view, leading to code duplication and difficulty in customizing layouts.

The changes introduce the concept of sections, which are distinct areas within a view that can contain multiple cards.
The home view is updated to use sections for the persons, areas, and quick access cards.
This makes it easier to create responsive layouts that adapt to different screen sizes.
The branch is rebased onto `main` branch.
At `main`, badges where still called chips.

Changes to `SwitchChip.ts` are applies to `SwitchBadge.ts` in this
commit.
This push was meant for debug purposes only.
@DigiLive
DigiLive force-pushed the homeview-masonary-to-sections branch from b10913c to 212c04e Compare October 19, 2025 09:11
DigiLive and others added 10 commits October 25, 2025 09:13
Remove legacy chips card/types and an obsolete notice manager as part of the
refactor that migrates chips functionality to the new badges approach. This
cleans up redundant type definitions and utility code, reduces maintenance
overhead, and prevents stale/deprecated APIs from being used going forward.
Rename the switch confirmation translation key from "chip_confirmation" to
"badge_confirmation" and update usages. Aligns translations and code with
the chips-to-badges refactor so confirmation messaging uses consistent
terminology across locales.
Update the project version to v3.0.0-alpha.1 across package metadata,
documentation badges/links, and the runtime version string.

Prepares a new alpha release so users and tools reflect the upcoming
release candidate and documentation points to the correct tag.
Updated the property name from showControls to show_controls
across multiple files for consistency with naming conventions.
This change improves code readability and maintainability.
Copilot AI review requested due to automatic review settings January 31, 2026 09:24

This comment was marked as outdated.

AalianKhan
AalianKhan previously approved these changes Jan 31, 2026
- Restore default strategy options on import failure.
  Prevents leaving options undefined after an import error so the
  application has a valid fallback configuration.

- Enforce correct typing when setting undisclosed area id.
  Ensures type compatibility and avoids type errors when mutating
  the undisclosed area configuration.

- Allow areas map to accept aggregate area configs.
  Supports using a shorthand/all-areas config alongside individual
  area entries in the strategy configuration.

- Add optional hidden flag to aggregate area config.
  Enables marking groups of areas as hidden without changing
  individual area definitions.

- Broaden view section return type and fix a comment typo.
  Reflects that view creation can return either card arrays or
  sectioned configs and improves source clarity.
- Fix a typo in a comment.
  Improve clarity by correcting a misspelled word in the inspection
  comment.

- Broaden the return type of the view sections method.
  Allow returning either a list of cards or a list of sections so views
  that produce card arrays are supported alongside section-based views.
- Restore strategy options to defaults on import failure.
  Why: ensures the registry retains a valid configuration when loading
  strategy options fails, preventing an undefined or
  partially-initialized state.

- Enforce area_id assignment with correct typing for undisclosed area.
  Why: prevents a typing/assignment issue and guarantees the required
  property stays set on the undisclosed area so downstream logic can
  rely on it.
Corrected a minor typo in the comment to improve clarity and maintain
code quality. This change ensures that the comment accurately describes
the functionality of the method.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 42 out of 44 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/views/AbstractView.ts
Comment thread src/views/HomeView.ts
Updated comments to reflect the correct method name for creating
card configurations in the getView() function. This improves clarity
and ensures accurate documentation for future reference.
# Conflicts:
#	README.md
#	dist/mushroom-strategy.js
#	docs/index.md
#	docs/options/home-view-options.md
#	package-lock.json
#	package.json
#	src/mushroom-strategy.ts
#	src/views/AbstractView.ts
#	src/views/HomeView.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/views/HomeView.ts Outdated
Comment thread docs/options/home-view-options.md Outdated
Comment thread src/cards/GreetingCard.ts Outdated
Comment thread src/types/strategy/strategy-generics.ts Outdated
DigiLive and others added 5 commits March 21, 2026 18:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Updated the logic for displaying greeting and area cards based on
visibility settings. Simplified conditional checks and improved
readability by using nullish coalescing. Added a new configuration
file for Codacy to enhance code quality checks.
Improved the formatting of various Markdown files to ensure uniformity
in bullet points and line breaks.
This enhances readability and maintains consistent style across the
documentation.
@DigiLive
DigiLive merged commit f648140 into main Mar 22, 2026
1 check passed
@DigiLive
DigiLive deleted the homeview-masonary-to-sections branch March 22, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants