Skip to content

Commit f648140

Browse files
authored
Homeview masonary to sections (#247)
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.
1 parent 7631fbd commit f648140

34 files changed

Lines changed: 371 additions & 231 deletions

.codacy.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
engines:
3+
# Modern Linting & Security
4+
eslint9:
5+
enabled: true
6+
opengrep:
7+
enabled: true
8+
9+
# Logic & Quality Metrics
10+
lizard:
11+
enabled: true
12+
pmd7:
13+
enabled: true
14+
15+
# CSS & Web Standards
16+
stylelint:
17+
enabled: true
18+
19+
# Documentation & Config
20+
markdownlint:
21+
enabled: true
22+
spectral:
23+
enabled: true
24+
jackson-linter:
25+
enabled: true
26+
27+
# Dependency Scanning (since you have package.json)
28+
trivy:
29+
enabled: true
30+
31+
# Explicitly disable Legacy
32+
eslint:
33+
enabled: false
34+
tslint:
35+
enabled: false
36+
csslint:
37+
enabled: false
38+
pmd:
39+
enabled: false
40+
checkov:
41+
enabled: false
42+
43+
# Your specific exclusions
44+
exclude_paths:
45+
- "dist/**"
46+
- "src/types/homeassistant/**"
47+
- "src/types/lovelace-mushroom/**"
48+
- "node_modules/**" # Standard practice to ensure speed

.github/PULL_REQUEST_TEMPLATE/documentation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Explain why this change is needed and the impact it has on the project or users.
2828

2929
Please check off the following tasks that apply to your change:
3030

31-
* [ ] I have **reviewed the existing documentation** to ensure my changes are consistent with the current style and
31+
- [ ] I have **reviewed the existing documentation** to ensure my changes are consistent with the current style and
3232
tone.
33-
* [ ] I have checked for and fixed any **broken links** (internal or external).
34-
* [ ] I have confirmed that the new/updated content is **technically accurate**.
35-
* [ ] I have ensured any **code snippets or examples** are properly formatted and valid.
36-
* [ ] I have tested that the documentation **builds and displays correctly** (if applicable, by running the local
33+
- [ ] I have checked for and fixed any **broken links** (internal or external).
34+
- [ ] I have confirmed that the new/updated content is **technically accurate**.
35+
- [ ] I have ensured any **code snippets or examples** are properly formatted and valid.
36+
- [ ] I have tested that the documentation **builds and displays correctly** (if applicable, by running the local
3737
documentation server).
3838

3939
---

.markdownlint.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema-strict.json",
33
"default": true,
4+
"MD004": {
5+
"style": "dash"
6+
},
47
"MD013": {
58
"line_length": 120,
69
"code_block_line_length": 120,

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ sexual identity and orientation.
1212

1313
Examples of behavior that contributes to a positive environment for our community include:
1414

15-
* Demonstrating empathy and kindness toward other people.
16-
* Being respectful of differing opinions, viewpoints, and experiences.
17-
* Giving and gracefully accepting constructive feedback.
18-
* Accepting responsibility and apologizing to those affected by our mistakes and learning from the experience.
19-
* Focusing on what is best not just for us as individuals, but for the overall community.
15+
- Demonstrating empathy and kindness toward other people.
16+
- Being respectful of differing opinions, viewpoints, and experiences.
17+
- Giving and gracefully accepting constructive feedback.
18+
- Accepting responsibility and apologizing to those affected by our mistakes and learning from the experience.
19+
- Focusing on what is best not just for us as individuals, but for the overall community.
2020

2121
Examples of unacceptable behavior include:
2222

23-
* The use of sexualized language or imagery, and sexual attention or advances.
24-
* Trolling, insulting or derogatory comments, and personal or political attacks.
25-
* Public or private harassment.
26-
* Publishing private information of others, such as a physical or email address, without their explicit permission.
27-
* Another conduct which could reasonably be considered inappropriate in a professional setting.
23+
- The use of sexualized language or imagery, and sexual attention or advances.
24+
- Trolling, insulting or derogatory comments, and personal or political attacks.
25+
- Public or private harassment.
26+
- Publishing private information of others, such as a physical or email address, without their explicit permission.
27+
- Another conduct which could reasonably be considered inappropriate in a professional setting.
2828

2929
## Our Responsibilities
3030

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ If you then still feel the need to ask a question and need clarification, we rec
5656

5757
- Open a new discussion or issue.
5858
- Provide as much context as you can about what you're running into.
59-
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
59+
- Provide project and platform versions (Node.js, npm, etc.), depending on what seems relevant.
6060

6161
We will then take care of the issue as soon as possible.
6262

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
**Effortlessly create stunning Home Assistant Dashboards with the Mushroom Dashboard Strategy!**
1010

11-
* Are you tired of manually configuring your Home Assistant dashboards?
11+
- Are you tired of manually configuring your Home Assistant dashboards?
1212
Do you love the elegant design of Mushroom cards but wish for a simpler way to organize your entities,
1313
devices, and areas?
1414

@@ -20,10 +20,10 @@ leveraging the power and aesthetics of Mushroom cards with minimal configuration
2020

2121
## **Why Choose Mushroom Dashboard Strategy?**
2222

23-
* **⚡️ Automatic Dashboard Generation:** Go from zero to a beautiful dashboard with just a few lines of YAML.
24-
* **🏡 Intelligent Organization:** Automatically creates intuitive views for your devices, areas, and entities.
25-
* **🎨 Highly Customizable:** Tailor your dashboard to your unique smart home setup with extensive options.
26-
* **📈 Integrated Insights:** Seamlessly displays mini graph cards for your sensor data.
23+
- **⚡️ Automatic Dashboard Generation:** Go from zero to a beautiful dashboard with just a few lines of YAML.
24+
- **🏡 Intelligent Organization:** Automatically creates intuitive views for your devices, areas, and entities.
25+
- **🎨 Highly Customizable:** Tailor your dashboard to your unique smart home setup with extensive options.
26+
- **📈 Integrated Insights:** Seamlessly displays mini graph cards for your sensor data.
2727

2828
---
2929

@@ -47,13 +47,13 @@ The **Mushroom Dashboard Strategy** is available through HACS (Home Assistant Co
4747

4848
We welcome contributions and feedback!
4949

50-
* Have questions or need help?
50+
- Have questions or need help?
5151
Check out our [Discussions](https://github.com/DigiLive/mushroom-strategy/discussions) page.
5252

53-
* Found a bug or have an idea?
53+
- Found a bug or have an idea?
5454
Open an [Issue](https://github.com/DigiLive/mushroom-strategy/issues).
5555

56-
* Enjoying the Mushroom Strategy?
56+
- Enjoying the Mushroom Strategy?
5757
Consider giving our project a ⭐ [star on GitHub](https://github.com/DigiLive/mushroom-strategy) and exploring ways
5858
to ❤️ [sponsor the project](https://github.com/sponsors/DigiLive) to support its continued development!
5959
Your support helps us grow and improve.

dist/mushroom-strategy.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/contributing/code.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Want to get your hands dirty with the code? Awesome! We appreciate all code cont
88

99
3. **Test Your Changes:** Thoroughly test your changes to ensure they work as expected and don't introduce new issues.
1010

11-
* You can build the strategy with `npm run build` (for production) or `npm run build-dev` (for development/testing).
12-
* Copy the built files to your Home Assistant's `www/community/mushroom-strategy` directory for testing.
11+
- You can build the strategy with `npm run build` (for production) or `npm run build-dev` (for development/testing).
12+
- Copy the built files to your Home Assistant's `www/community/mushroom-strategy` directory for testing.
1313
**Remember to clear the cache of your Home Assistant client** to see the changes.
1414

1515
!!! info
@@ -19,8 +19,8 @@ Want to get your hands dirty with the code? Awesome! We appreciate all code cont
1919

2020
4. **Format and Lint Your Changes:**
2121

22-
* Run the formatter with `npm run ts:format`.
23-
* Build the strategy with `npm run build`.
22+
- Run the formatter with `npm run ts:format`.
23+
- Build the strategy with `npm run build`.
2424

2525
Both of these tasks should result without errors.
2626

docs/contributing/documentation.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ The entire documentation lives in the `docs/` folder of this repository.
1111
1. **Follow the [Workflow](workflow.md):**
1212

1313
2. **Serve the Documentation Locally**:
14-
Start the local development server. This task needs to be run from the **project root** (where the `mkdocs.yml` file is):
14+
Start the local development server.<br>
15+
This task needs to be run from the **project root** (where the `mkdocs.yml` file is):
1516

1617
```bash
1718
mkdocs serve
@@ -54,7 +55,7 @@ The entire documentation lives in the `docs/` folder of this repository.
5455
```bash
5556
npm run md:lint-fix
5657
```
57-
58+
5859
This task should result without errors.
5960
6061
8. **Commit Your Changes.**
@@ -69,7 +70,7 @@ The entire documentation lives in the `docs/` folder of this repository.
6970
7071
Our documentation uses `mike` to manage multiple versions of the documentation:
7172
72-
- **The main version**: Every time a Pull Request is merged into the main branch, the documentation at /main/ is
73+
- **The main version**: Every time a Pull Request is merged into the main branch, the documentation at /main/ is
7374
updated.
7475
This represents the "development" or "upcoming" version.
7576

docs/contributing/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Found a bug? That's not ideal, but your report helps us squash it!
2525
a [new issue](https://github.com/DigiLive/mushroom-strategy/issues/new?template=bug_report.yml).
2626
3. **Provide details:** In your report, please follow the instructions and template to include:
2727

28-
* A clear and concise description of the bug.
29-
* Steps to reproduce the behavior.
30-
* Expected behavior.
31-
* Screenshots or animated GIFs (if applicable).
32-
* Your Home Assistant version and Mushroom Strategy version.
28+
- A clear and concise description of the bug.
29+
- Steps to reproduce the behavior.
30+
- Expected behavior.
31+
- Screenshots or animated GIFs (if applicable).
32+
- Your Home Assistant version and Mushroom Strategy version.
3333

3434
---
3535

0 commit comments

Comments
 (0)