Skip to content

Commit bb043d8

Browse files
change: [M3-10348, M3-10013] - Add/update inline docs for ACLP Alerts logic and fix Longview UI alignment issue (linode#12578)
* Add and update code comments * Fix longview UI alignment issue * Added changeset: Longview UI alignment issue * Added changeset: Add/update inline docs for ACLP Alerts logic
1 parent 4532307 commit bb043d8

File tree

5 files changed

+21
-6
lines changed

5 files changed

+21
-6
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Fixed
3+
---
4+
5+
Longview UI alignment issue ([#12578](https://github.com/linode/manager/pull/12578))
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Upcoming Features
3+
---
4+
5+
Add/update inline docs for ACLP Alerts logic ([#12578](https://github.com/linode/manager/pull/12578))

packages/manager/src/features/Linodes/AclpPreferenceToggle.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ const preferenceConfig: Record<
6767
},
6868
};
6969

70+
/**
71+
* - For Alerts, the toggle uses local state, not preferences. We do this because each Linode should manage its own alert mode individually.
72+
* - Create Linode: Toggle defaults to false (legacy mode). It's a simple UI toggle with no persistence.
73+
* - Edit Linode: Toggle defaults based on useIsLinodeAclpSubscribed (true if the Linode is already subscribed to ACLP). Still local state - not saved to preferences.
74+
*
75+
* - For Metrics, we use account-level preferences, since it's a global setting shared across all Linodes.
76+
*/
7077
export const AclpPreferenceToggle = (props: AclpPreferenceToggleType) => {
7178
const { isAlertsBetaMode, onAlertsModeChange, type } = props;
7279

packages/manager/src/features/Longview/shared/InstallationInstructions.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const StyledInstructionGrid = styled(Grid, {
1616
content: "'|'",
1717
left: `calc(-${theme.spacing(1)} + 2px)`,
1818
position: 'absolute',
19-
top: `calc(${theme.spacing(1)} - 3px)`,
19+
top: `calc(${theme.spacing(1)} - 8px)`,
2020
},
2121
marginLeft: theme.spacing(2),
2222
paddingLeft: theme.spacing(2),

packages/shared/src/hooks/useIsLinodeAclpSubscribed.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ type AclpStage = 'beta' | 'ga';
77
*
88
* ### Cases:
99
* - Legacy alerts = 0, Beta alerts = []
10-
* - Show default Legacy UI (disabled) for Beta
11-
* - Show default Beta UI (disabled) for GA
10+
* - Show default Legacy UI (disabled) for Beta stage
11+
* - Show default Beta UI (disabled) for GA stage
1212
* - Legacy alerts > 0, Beta alerts = []
1313
* - Show default Legacy UI (enabled)
1414
* - Legacy alerts = 0, Beta alerts has values (either system, user, or both)
15-
* - Show default Beta UI
16-
* - Legacy alerts > 0, Beta alerts has values (either system, user, or both)
17-
* - Show default Beta UI
15+
* - Show default Beta UI (enabled)
1816
*
1917
* @param linodeId - The ID of the Linode
2018
* @param stage - The current ACLP stage: 'beta' or 'ga'

0 commit comments

Comments
 (0)