Commit Graph

19 Commits

Author SHA1 Message Date
Bruno Pantaleão Gonçalves
5d3bdee45a Add assertion for IconDrawable methods (#3655)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-16 16:53:59 +02:00
Bruno Pantaleão Gonçalves
b60d80be2e Add more logs to material design icons registration (#3616)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2025-05-27 14:30:02 +02:00
Bruno Pantaleão Gonçalves
a0606361fb Avoid register material design icons more than once (#2690)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2024-04-03 10:52:23 +02:00
Bruno Pantaleão Gonçalves
794fb808ef Revert "Avoid registering material design icons font several times" (#2686)
Reverts home-assistant/iOS#2669
2024-04-02 10:56:13 +02:00
Bruno Pantaleão Gonçalves
b905a97246 Avoid registering material design icons font several times (#2669) 2024-03-30 23:42:52 +01:00
mat1th
97834bfd5e Update swift lint and format + appy fixes (#2585)
## Summary
Swift lint and swiftformat are outdated. This PR does update those +
applies the new formatting form swiftformat.
There is 1 swift file with a manual change:
`Sources/Vehicle/Templates/Areas/CarPlayAreasViewModel.swift`. This is
done because `swiftlint` did create the following swiftlint error:
`error: Cyclomatic Complexity Violation: Function should have complexity
10 or less; currently complexity is 11 (cyclomatic_complexity)`.

Because it does change a lot of files the question is if we want to
finetune the `swiftformat` rules.

## Screenshots
No user facing changes.

## Link to pull request in Documentation repository
NA

## Any other notes
NA
2024-02-22 13:06:39 +01:00
Bruno Pantaleão Gonçalves
e9c85b3f7a Drop iOS 12, 13 and 14 support (#2469)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
Drop support for iOS 12 and 13.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2023-12-27 16:50:11 +01:00
Zac West
567ba8d832 Update dependencies (#2306)
## Summary
Updates libraries & MaterialDesignIcons.
2023-02-10 10:24:33 -08:00
Zac West
64e97ce44b Bump MaterialDesignIcons to 7.0.96 (#2160) 2022-07-24 14:37:03 -07:00
Zac West
8fa149abc3 Update dependencies (#1946)
## Summary
- Updates Firebase, Realm, Sentry, SwiftFormat, SwiftLint, Eureka, Sodium.
- Updates MaterialDesignIcons to 6.5.95. Fixes #1933.
- Updates Fastlane which now supports App Store Connect API keys for things like dSYM downloading.
2021-11-29 18:48:49 -08:00
Zac West
2fbec06ee2 Update appearance of widgets (#1873)
## Summary
Styles with a background and a decorator icon to differentiate it from actions.

## Screenshots
| Small/Expanded | Normal | Full |
| -- | -- | -- |
| <img width="200" src="https://user-images.githubusercontent.com/74188/135736388-e685feaa-d368-470b-b66d-38ca5ccd1415.png"> | <img width="200" src="https://user-images.githubusercontent.com/74188/135736392-ee55289b-8ff4-435c-93c7-98b5c0044e44.png"> | <img width="200" src="https://user-images.githubusercontent.com/74188/135736394-a331cb63-066b-4e48-bcd2-b3c859072377.png"> |

## Any other notes
- Adds a small gradient on top of both widget kinds.
- Supports doing an on-the-fly MDI migration if we encounter an icon that was deleted/renamed.
2021-10-02 19:08:41 -07:00
Zac West
a2491d632d Minor fixes for open page widget (#1867)
## Summary
- Fixes e.g. HACS (which is `hacs:hacs`) icons showing the A/B icon. We now fall back to the outline cog.
- Hide panels without the "show in sidebar" option. We get them in the response, but e.g. the title is incorrect.
- Changes sort order in the automatic version to more closely align with the frontend.
- Fixes a case where chosen panels in the past would fail to be updated due to being at the tail end of the array in the API response, due to truncating to widget size _before_ updating.

## Screenshots
![image](https://user-images.githubusercontent.com/74188/135203919-d2951c9a-0bfe-4eb4-8285-a74f9c546882.png)
2021-09-29 04:49:43 +00:00
Zac West
a8220f690e Upgrade MaterialDesignIcons to 6.1.95 (#1844)
## Summary
- Upgrades the font, config, and adds a migration for renamed/removed icons.
- Migrates the one use of a renamed/removed one: `laptop-mac` -> `laptop`

## Any other notes
This change should also make it a little easier to do the migrations, since the Realm+Initialization part won't need to be touched, probably.
2021-09-19 10:36:57 -07:00
Zac West
b5f4b2fe40 Enable Mac interface idiom & Macify settings (#1600)
Fixes #1305.

## Summary
Enables the new-to-macOS 11 interface idiom of Mac, which removes any interface scaling and brings more Mac-like UI.

## Screenshots
<img width="350" alt="image" src="https://user-images.githubusercontent.com/74188/115946708-ea115500-a477-11eb-9e42-378e76d6e136.png"><img width="350" alt="image" src="https://user-images.githubusercontent.com/74188/115946711-eed60900-a477-11eb-8591-fd01a3711787.png">

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
- Updates Settings on Big Sur to use a toolbar to swap between root-level settings screens.
- Fixes blurry web view, only on Big Sur.
- `UISwitch` as a checkbox looks kind of weird; may need to do some Eureka-level changes to make SwitchRow use the `title` property on `UISwitch` to make it connected so the whole thing is clickable. This gets weird because the font size is larger for this property.
2021-04-24 07:08:30 +00:00
Zac West
640cca884b Add SwiftFormat to project (#1463)
Adds new fastlane lanes:
- `fastlane lint` which checks the linters
- `fastlane autocorrect` which applies the linters which can autocorrect (Rubocop, SwiftFormat)

Adds a build step to the Codegen abstract target which runs SwiftFormat in lint mode, pointing out what it's going to change when run.

Applies SwiftFormat to nearly all code -- exempts a few externally-sourced files and generated code.
2021-02-05 22:06:25 -08:00
Zac West
5def7adcfe Update MaterialDesignIcons to 5.9.55 (#1411)
## Summary
First time bumping since moving to straight SwiftGen. Very easy. The next one will likely be hard as 6.x has migrations.

## Any other notes
This includes a new icon, `webcam-off`. Once core has it, it would be nice to switch the camera sensors to use it.
2021-01-24 00:23:28 -08:00
Zac West
78536fae5d Upgrade MaterialDesignIcons to 5.8.55 (#1360)
Fixes #1244 and fixes #1139.

## Summary
Updates MaterialDesignIcons from 5.5.55 to 5.8.55. Between these two versions, there are no changes that require renaming any existing database entries.

## Screenshots
n/a

## Link to pull request in Documentation repository
n/a

## Any other notes
- Converts from using Iconic and a fork of SwiftGen to generate the MaterialDesignIcons.swift file to using SwiftGen and its JSON parsing. This hopefully gives us a much easier path to updating in the future, since it can be done by changing the shell script and nothing else.
- Updates the generated `MaterialDesignIcons` to be class-based rather than enum-based; moving to a `RawRepresentable` enum (which would reduce the size, see #1139) proved to be far too long to compile. This version is still about 1/3 the code size.
- Cleans up some of the icon selecting to (1) not generate icons too often, and (2) not go in and out of the non-String representation.
2021-01-09 16:29:01 -08:00
Zac West
66bd05b294 Update dependencies, fix new lint warnings (#1302)
- Updates Fastlane & its dependencies (including new Lokalise actions for their new API).
- Updates app dependencies, and fixes new lint warnings due to SwiftLint being updated.
2020-12-17 23:47:55 -08:00
Zac West
4d9a530637 Reorganize files in repo, pull out build settings from pbxproj (#1140)
This is somewhat in prep of being able to make the project file generated, but also just organizes things into more concrete directory structures.

This pulls out _all_ of the build settings from the root level, and most from the target level, into xcconfigs.

The new directory structure looks like:

- Sources
  - App
    - (everything from HomeAssistant/)
  - WatchApp
  - Shared
  - MacBridge
  - Extensions
    - Intents
    - NotificationContent
    - NotificationService
    - Share
    - Today
    - Watch
    - Widgets
- Tests
  - App
  - UI
  - Shared

Somewhat intentionally, the file structure under these is not yet standardized/organized.

The project targets are now:

- App
- WatchApp
- Shared-iOS
- Shared-watchOS
- MacBridge
- Tests-App
- Tests-UI
- Tests-Shared
- Extension-Intents
- Extension-NotificationContent
- Extension-NotificationService
- Extension-Share
- Extension-Today
- Extension-Widget
- WatchExtension-Watch

This does not yet clean up resources vs. sources, nor does it handle some of the "it's in Sources/App but it's part of Shared" crossover directory issues.
2020-10-03 00:15:04 -07:00