Skip to content

Koala-Theme: Plans - temporary mode warning, link to plan settings#3147

Open
Brett-S-OWB wants to merge 16 commits intoopenWB:masterfrom
Brett-S-OWB:plans-persist-link
Open

Koala-Theme: Plans - temporary mode warning, link to plan settings#3147
Brett-S-OWB wants to merge 16 commits intoopenWB:masterfrom
Brett-S-OWB:plans-persist-link

Conversation

@Brett-S-OWB
Copy link
Contributor

Wenn „Temporäre Ladeeinstellungen“ aktiviert sind:
• In den Ladeplänen wird ein Warnhinweis angezeigt, der den Nutzer darüber informiert, dass Änderungen am Plan nach dem Abstecken des Fahrzeugs verworfen werden.
• Wird in diesem Modus ein neuer Plan erstellt, erscheint zusätzlich ein Hinweis, dass der gesamte Plan nach der Ladesession (nach dem Abstecken) verworfen wird.
• Unteren in Plan wird ein Button zur direkten Navigation in die Fahrzeug-Ladeprofil-Einstellungen eingeblendet, damit Änderungen dort dauerhaft verändert werden können.

Bildschirmfoto 2026-02-17 um 15 45 13 Bildschirmfoto 2026-02-17 um 15 45 21 Bildschirmfoto 2026-02-17 um 15 45 47 Bildschirmfoto 2026-02-17 um 15 45 54 Bildschirmfoto 2026-02-17 um 15 53 59

@benderl benderl added the user-management Anpassung an die Benutzerverwaltung erforderlich! label Feb 26, 2026
@LKuemmel LKuemmel requested review from benderl and Copilot March 10, 2026 07:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds UI hints and navigation to help users understand and handle “temporary charge settings mode” while editing charging plans in the Koala web theme.

Changes:

  • Expose a new MQTT-store computed flag for temporary charge template mode.
  • Show a warning banner in scheduled/time plan detail dialogs when temporary mode is active.
  • Add a “go to persistent plan settings” button and introduce a theme color variable for it; refactor charge point messages into a reusable BaseMessage.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
packages/modules/web_themes/koala/source/src/stores/mqtt-store.ts Adds temporaryChargeModeAktiv computed and exports it from the store.
packages/modules/web_themes/koala/source/src/css/quasar.variables.scss Introduces --q-charge-plan-link-button CSS variable for button styling.
packages/modules/web_themes/koala/source/src/components/ChargePointTimeChargingPlanDetails.vue Adds temporary-mode warning + link button in time plan details and sets fixed card width.
packages/modules/web_themes/koala/source/src/components/ChargePointScheduledPlanDetails.vue Adds temporary-mode warning + link button in scheduled plan details and sets fixed card width.
packages/modules/web_themes/koala/source/src/components/ChargePointMessage.vue Refactors to use new BaseMessage component.
packages/modules/web_themes/koala/source/src/components/BaseMessage.vue New reusable message component with collapse behavior and styling.

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

Comment on lines +1806 to +1810
const temporaryChargeModeAktiv = computed(() => {
const chargeMode = getValue.value(
'openWB/general/temporary_charge_templates_active'
) as boolean | undefined;
return chargeMode;
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

temporaryChargeModeAktiv currently returns boolean | undefined because no default is provided to getValue.value(...). Since callers treat undefined as false anyway, consider passing a default (false) here and returning a plain boolean to simplify usage and keep it consistent with other boolean computeds in this store.

Copilot uses AI. Check for mistakes.
Comment on lines 78 to +82
--q-battery-fill: #{$battery-fill};
--q-battery-fill-flow-diagram: #{$battery-fill-flow-diagram};
--q-charge-point-stroke: #{$charge-point-stroke};
--q-charge-point-fill: #{$charge-point-fill};
--q-charge-plan-link-button: #{$charge-plan-link-button};
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

--q-charge-plan-link-button is added to :root, but it’s not overridden in the .body--dark block later in this file (unlike other custom vars such as --q-charge-point-stroke/fill). If this button should be themed in dark mode as well, add a corresponding --q-charge-plan-link-button definition under .body--dark (potentially with a different color for contrast).

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +12
v-if="showMessage"
class="row q-mt-sm q-pa-sm text-white no-wrap cursor-pointer"
:class="[{ 'items-center': collapsed }, messageClass]"
style="border-radius: 10px"
@click="toggleCollapse"
>
<q-icon :name="iconName" size="sm" class="q-mr-xs" />
<div :class="{ ellipsis: collapsed }">
{{ message }}
</div>
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

BaseMessage forces no-wrap and starts in collapsed=true mode, which will truncate the newly added long warning texts (and even when “expanded”, no-wrap still prevents wrapping). Consider adding a prop to disable collapsing / allow wrapping (or default warnings to expanded + wrap) so important warnings are fully readable without awkward overflow.

Copilot uses AI. Check for mistakes.
Comment on lines +194 to +195
><q-icon left size="xs" name="settings" /> persistente Ladeplan
Einstellungen</q-btn
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Button label text has grammatical/capitalization issues: "persistente Ladeplan Einstellungen" should be capitalized and typically hyphenated in German (e.g. "Persistente Ladeplan‑Einstellungen") for readability.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +15
<BaseMessage
:show-message="temporaryChargeModeActive"
message="Temporärer Modus aktiv. Alle Planänderungen werden nach dem Abstecken verworfen."
type="warning"
/>
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

PR description mentions an additional, stronger hint specifically when a new plan is created in temporary mode (that the whole plan will be discarded after unplugging). The current implementation always shows the same generic warning string, so that “new plan” case doesn’t seem to be covered yet.

Copilot uses AI. Check for mistakes.
Comment on lines +261 to +263
><q-icon left size="xs" name="settings" /> persistente Ladeplan
Einstellungen</q-btn
>
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Button label text has grammatical/capitalization issues: "persistente Ladeplan Einstellungen" should be capitalized and typically hyphenated in German (e.g. "Persistente Ladeplan‑Einstellungen") for readability.

Copilot uses AI. Check for mistakes.
Comment on lines +1806 to +1811
const temporaryChargeModeAktiv = computed(() => {
const chargeMode = getValue.value(
'openWB/general/temporary_charge_templates_active'
) as boolean | undefined;
return chargeMode;
});
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

New store export is named temporaryChargeModeAktiv (German spelling) while the consuming components use temporaryChargeModeActive. To keep the public store API consistent with the rest of mqtt-store (mostly English names), consider renaming this to temporaryChargeModeActive (and update references) so callers don’t have to remember mixed-language naming.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +15
<BaseMessage
:show-message="temporaryChargeModeActive"
message="Temporärer Modus aktiv. Alle Planänderungen werden nach dem Abstecken verworfen."
type="warning"
/>
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

PR description mentions an additional, stronger hint specifically when a new plan is created in temporary mode (that the whole plan will be discarded after unplugging). The current implementation always shows the same generic warning string, so that “new plan” case doesn’t seem to be covered yet.

Copilot uses AI. Check for mistakes.
Comment on lines +191 to +194
size="sm"
class="col charge-plan-link-button"
:href="`/openWB/web/settings/#/VehicleConfiguration/charge_template/${chargeTemplateId ?? ''}`"
><q-icon left size="xs" name="settings" /> persistente Ladeplan
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

The settings link is built even when chargeTemplateId is undefined (it falls back to an empty string), which can produce a broken URL like .../charge_template/. Consider guarding the button with v-if="temporaryChargeModeActive && chargeTemplateId != null" or disabling it until an ID is available.

Copilot uses AI. Check for mistakes.
Comment on lines +258 to +261
size="sm"
class="col charge-plan-link-button"
:href="`/openWB/web/settings/#/VehicleConfiguration/charge_template/${chargeTemplateId ?? ''}`"
><q-icon left size="xs" name="settings" /> persistente Ladeplan
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

The settings link is built even when chargeTemplateId is undefined (it falls back to an empty string), which can produce a broken URL like .../charge_template/. Consider guarding the button with v-if="temporaryChargeModeActive && chargeTemplateId != null" or disabling it until an ID is available.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

user-management Anpassung an die Benutzerverwaltung erforderlich!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants