-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Massive rework of the templates #358
Conversation
WalkthroughThe pull request introduces a systematic refactoring of default image path handling across multiple controller files. The changes consolidate various state-specific template paths (muted, unavailable, blocked) into a single Changes
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Build for this pull request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/controllers/hotline.ts (1)
10-10
: Consider removing the redundant template path constant.While the change aligns with the PR's objective by using the same template, consider removing
defaultUnavailableTemplatePath
entirely and directly usingdefaultTemplatePath
in theunavailableImagePath
getter, consistent with the approach taken in other controller files.Apply this diff to align with other controllers:
-const defaultUnavailableTemplatePath = "images/actions/hotline/template.svg";
Then update the
unavailableImagePath
getter:- return this._unavailableImagePath ?? defaultUnavailableTemplatePath; + return this._unavailableImagePath ?? defaultTemplatePath;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (15)
com.neil-enns.trackaudio.sdPlugin/images/actions/atisLetter/template.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/hotline/template.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/hotline/unavailable.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/pushToTalk/black.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/pushToTalk/orange.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/pushToTalk/pushtotalk.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/pushToTalk/template.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/stationStatus/blocked.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/stationStatus/stationstatus.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/stationStatus/template.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/stationStatus/unavailable.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/stationVolume/muted.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/stationVolume/notMuted.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/stationVolume/template.svg
is excluded by!**/*.svg
com.neil-enns.trackaudio.sdPlugin/images/actions/stationVolume/unavailable.svg
is excluded by!**/*.svg
📒 Files selected for processing (4)
src/controllers/atisLetter.ts
(2 hunks)src/controllers/hotline.ts
(1 hunks)src/controllers/stationStatus.ts
(3 hunks)src/controllers/stationVolume.ts
(4 hunks)
🔇 Additional comments (5)
src/controllers/atisLetter.ts (2)
127-127
: LGTM! Template path consolidation.The consolidation of template paths by using
defaultTemplatePath
instead of a separatedefaultUnavailableTemplatePath
aligns with the PR's objective of simplifying template path handling.
249-249
: LGTM! State parameter correction.The state parameter has been correctly updated to "unavailable" to accurately represent the unavailable state in the template.
src/controllers/stationVolume.ts (2)
9-9
: LGTM! Template path definition.The addition of
defaultTemplatePath
with a consistent path pattern aligns with the PR's template consolidation objective.
49-49
: LGTM! Consistent template path usage.The getters for
notMutedTemplatePath
,mutedTemplatePath
, andunavailableTemplatePath
have been consistently updated to use the consolidateddefaultTemplatePath
.Also applies to: 63-63, 77-77
src/controllers/stationStatus.ts (1)
75-75
: LGTM! Consistent template path consolidation.The getters for
mutedImagePath
,blockedCommsImagePath
, andunavailableImagePath
have been consistently updated to use the consolidateddefaultTemplatePath
, aligning with the PR's objective and the approach taken in other controllers.Also applies to: 113-113, 143-143
Build for this pull request: |
Fixes #357
Summary by CodeRabbit
Summary by CodeRabbit
Refactor
Bug Fixes