Skip to content

Commit

Permalink
Merge pull request #10416 from linode/staging
Browse files Browse the repository at this point in the history
Release v1.118.0 - staging → master
  • Loading branch information
hkhalil-akamai authored Apr 29, 2024
2 parents 5825d01 + e868a07 commit d2187dd
Show file tree
Hide file tree
Showing 274 changed files with 10,418 additions and 3,234 deletions.
36 changes: 0 additions & 36 deletions docs/development-guide/13-coding-standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,39 +158,3 @@ For this reason, extending types with interfaces/extends is suggested over creat
```
Source: [TypeScript Wiki](https://github.com/microsoft/TypeScript/wiki/Performance#preferring-interfaces-over-intersections)
## Adobe Analytics
### Writing a Custom Event
Custom events live (mostly) in `src/utilities/analytics.ts`. Try to write and export custom events in this file if possible, and import them in the component(s) where they are used.
```tsx
// Component.tsx {file(s) where the event is called, for quick reference}
// OtherComponent.tsx

sendDescriptiveNameEvent () => {
category: '{Descriptive/Page Name}',
action: '{interaction such as Click, Hover, Focus}:{input type such as button, link, toggle, checkbox, text field} e.g. Click:link',
label: '{string associated with the event; e.g event label} (optional)',
value: '{number associated with the event; e.g. size of a volume} (optional)',
}
```
When adding a new custom event, coordinating with UX on the event's `category`, `action`, `label`, and `value` props values ensures consistency across our data.
Avoid including pipes (`|`) as delimiters in any of the event properties. They are used in Adobe Analytics to separate fields.
Avoid creating custom events that collect such as search queries, entity names, or other forms of user input. Custom events can still be fired on these actions with a generic `label` or no label at all.
Examples
- `sendMarketplaceSearchEvent` fires when selecting a category from the dropdown (`label` is predefined) and clicking the search field (a generic `label` is used).
- `sendBucketCreateEvent` sends the region of the bucket, but does not send the bucket label.
### Locally Testing Page Views & Custom Events and/or Troubleshooting
1. Set the `REACT_APP_ADOBE_ANALYTICS_URL` environment variable in `.env`.
2. Use the browser tools Network tab, filter requests by "adobe", and check that successful network requests have been made to load the launch script and its extensions.
3. In the browser console, type `_satellite.setDebug(true)`.
4. Refresh the page. You should see Adobe debug log output in the console. Each page view change or custom event that fires should be visible in the logs.
42 changes: 42 additions & 0 deletions docs/tooling/analytics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Adobe Analytics

Cloud Manager uses Adobe Analytics to capture page view and custom event statistics. To view analytics, Cloud Manager developers must follow internal processes to request access to Adobe Analytics dashboards.

## Writing a Custom Event

Custom events live (mostly) in `src/utilities/analytics.ts`. Try to write and export custom events in this file if possible, and import them in the component(s) where they are used.

A custom event will take this shape:
```tsx
// Component.tsx {file(s) where the event is called, for quick reference}
// OtherComponent.tsx

sendDescriptiveNameEvent () => {
category: '{Descriptive/Page/Flow Name}',
action: '{interaction such as Click, Hover, Focus}:{input type such as button, link, toggle, checkbox, text field} e.g. Click:link',
label: '{string associated with the event; e.g event label} (optional)',
value: '{number associated with the event; e.g. size of a volume} (optional)',
data: '{stringified object of additional key-value pairs; e.g. "{isLinodePoweredOff: true}"} (optional)'
}
```

When adding a new custom event, coordinate with UX on the event's `category`, `action`, `label`, and `value` variables to ensure consistency across our data.

`data` is an additional variable we use to capture information associated with an event that cannot easily or clearly be represented via the other variables; for example, boolean key-value pair(s). To add an additional property to `data`, it should first be added as an optional property and typed in the `CustomAnalyticsData` interface.

Avoid including pipes (`|`) as delimiters in any of the event properties. They are used in Adobe Analytics to separate fields.

Avoid creating custom events that collect such as search queries, entity names, or other forms of user input. Custom events can still be fired on these actions with a generic `label` or no label at all.

Examples

- `sendMarketplaceSearchEvent` fires when selecting a category from the dropdown (`label` is predefined) and clicking the search field (a generic `label` is used).
- `sendBucketCreateEvent` sends the region of the bucket, but does not send the bucket label.

## Locally Testing Page Views & Custom Events and/or Troubleshooting

1. Set the `REACT_APP_ADOBE_ANALYTICS_URL` environment variable in `.env`.
2. Use the browser tools Network tab, filter requests by "adobe", and check that successful network requests have been made to load the launch script and its extensions.
3. In the browser console, type `_satellite.setDebug(true)`.
4. Refresh the page. You should see Adobe debug log output in the console. Each page view change or custom event that fires should be visible in the logs.
5. When viewing dashboards in Adobe Analytics, it may take ~1 hour for analytics data to update. Once this happens, locally fired events will be visible in the dev dashboard.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"node-fetch": "^2.6.7",
"ua-parser-js": "^0.7.33",
"immer": "^9.0.6",
"lodash": "^4.17.21",
"glob-parent": "^5.1.2",
"hosted-git-info": "^5.0.0",
"yaml": "^2.3.0",
Expand Down
15 changes: 15 additions & 0 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## [2024-04-29] - v0.115.0


### Added:

- New endpoint for `volumes/types` ([#10376](https://github.com/linode/manager/pull/10376))

### Changed:

- Allow `stackscript_id` to be `null` in `CreateLinodeRequest` ([#10367](https://github.com/linode/manager/pull/10367))

### Upcoming Features:

- Add interface for linode migrate flow with placement groups ([#10339](https://github.com/linode/manager/pull/10339))

## [2024-04-15] - v0.114.0

### Added:
Expand Down
2 changes: 1 addition & 1 deletion packages/api-v4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linode/api-v4",
"version": "0.114.0",
"version": "0.115.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
10 changes: 9 additions & 1 deletion packages/api-v4/src/linodes/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export interface CreateLinodeRequest {
*
* This field cannot be used when deploying from a Backup or a Private Image.
*/
stackscript_id?: number;
stackscript_id?: number | null;
/**
* A Backup ID from another Linode’s available backups.
*
Expand Down Expand Up @@ -451,6 +451,14 @@ export interface CreateLinodeRequest {
placement_group?: CreateLinodePlacementGroupPayload;
}

export interface MigrateLinodeRequest {
placement_group?: {
id: number;
compliant_only?: boolean;
};
region: string;
}

export type RescueRequestObject = Pick<
Devices,
'sda' | 'sdb' | 'sdc' | 'sdd' | 'sde' | 'sdf' | 'sdg'
Expand Down
15 changes: 14 additions & 1 deletion packages/api-v4/src/volumes/volumes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Request, {
setURL,
setXFilter,
} from '../request';
import { Filter, Params, ResourcePage as Page } from '../types';
import { Filter, Params, ResourcePage as Page, PriceType } from '../types';
import {
AttachVolumePayload,
CloneVolumePayload,
Expand Down Expand Up @@ -48,6 +48,19 @@ export const getVolumes = (params?: Params, filters?: Filter) =>
setXFilter(filters)
);

/**
* getVolumeTypes
*
* Return a paginated list of available Volume types, which contains pricing information.
* This endpoint does not require authentication.
*/
export const getVolumeTypes = (params?: Params) =>
Request<Page<PriceType>>(
setURL(`${API_ROOT}/volumes/types`),
setMethod('GET'),
setParams(params)
);

/**
* attachVolume
*
Expand Down
62 changes: 62 additions & 0 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,68 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [2024-04-29] - v1.118.0


### Added:

- April Marketplace apps and SVGs ([#10382](https://github.com/linode/manager/pull/10382))

### Changed:

- Improve the UX of Access Token & Access Key drawers ([#10338](https://github.com/linode/manager/pull/10338))
- RegionSelect disabled option API updates ([#10373](https://github.com/linode/manager/pull/10373))
- Dynamic pricing with `volumes/types` endpoint ([#10376](https://github.com/linode/manager/pull/10376))
- Top Menu clean up and refactor ([#10383](https://github.com/linode/manager/pull/10383))
- PlanSelection availability updates and consolidation ([#10387](https://github.com/linode/manager/pull/10387))
- Shift wording from 'limited availability' to 'limited deployment availability' ([#10394](https://github.com/linode/manager/pull/10394))
- Gecko Beta copy updates ([#10400](https://github.com/linode/manager/pull/10400))

### Fixed:

- Charts Y-axis values are trimmed when scale is increased ([#10330](https://github.com/linode/manager/pull/10330))
- Chrome bug related to outdated CSS vendor prefixes ([#10380](https://github.com/linode/manager/pull/10380))
- Clickable disabled smaller plans in Resizing Tab ([#10381](https://github.com/linode/manager/pull/10381))
- New OBJ Buckets do not appear when created before initial fetch completes ([#10388](https://github.com/linode/manager/pull/10388))

### Removed:

- Deprecated Marketplace apps ([#10382](https://github.com/linode/manager/pull/10382))

### Tech Stories:

- Refactor and streamline VPC queries ([#10322](https://github.com/linode/manager/pull/10322))
- Update documentation on Adobe Analytics to cover data property ([#10365](https://github.com/linode/manager/pull/10365))
- Add isFeatureEnabledV2 to check for feature flag AND account capability ([#10371](https://github.com/linode/manager/pull/10371))
- Replace sanitize-html with dompurify ([#10378](https://github.com/linode/manager/pull/10378))
- Remove lodash (global import) as a package dependency ([#10386](https://github.com/linode/manager/pull/10386))
- Add Gravatar Analytics ([#10389](https://github.com/linode/manager/pull/10389))

### Tests:

- Add tests for Parent/Child Users & Grants page ([#10240](https://github.com/linode/manager/pull/10240))
- Add new Cypress tests for Longview landing page ([#10321](https://github.com/linode/manager/pull/10321))
- Add VM Placement Group landing page empty state UI test ([#10350](https://github.com/linode/manager/pull/10350))
- Fix `machine-image-upload.spec.ts` e2e test flake ([#10370](https://github.com/linode/manager/pull/10370))
- Update latest kernel version to fix `linode-config.spec.ts` ([#10391](https://github.com/linode/manager/pull/10391))
- Fix hanging account switching test ([#10396](https://github.com/linode/manager/pull/10396))

### Upcoming Features:

- Add Placement Groups to Linode Migrate flow ([#10339](https://github.com/linode/manager/pull/10339))
- Add text copy for Placement Group region limits in PlacementGroupsCreateDrawer ([#10355](https://github.com/linode/manager/pull/10355))
- Invalidate Placement Group queries on Linode create & delete mutations ([#10366](https://github.com/linode/manager/pull/10366))
- Update the Placement Groups SVG icon ([#10379](https://github.com/linode/manager/pull/10379))
- Fix & Improve Placement Groups feature restriction ([#10372](https://github.com/linode/manager/pull/10372))
- Linode Create Refactor:
- VPC (#10354)
- StackScripts (#10367)
- Validation (#10374)
- User Defined Fields ([#10395](https://github.com/linode/manager/pull/10395))
- Update gecko feature flag to object ([#10363](https://github.com/linode/manager/pull/10363))
- Show the selected regions as chips in the AccessKeyDrawer ([#10375](https://github.com/linode/manager/pull/10375))
- Add feature flag for Linode Disk Encryption (LDE) ([#10402](https://github.com/linode/manager/pull/10402))

## [2024-04-15] - v1.117.0

### Added:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,42 @@ describe('Personal access tokens', () => {
.findByTitle('Add Personal Access Token')
.should('be.visible')
.within(() => {
// Attempt to submit form without specifying a label
// Confirm submit button is disabled without specifying scopes.
ui.buttonGroup
.findButtonByTitle('Create Token')
.scrollIntoView()
.should('be.visible')
.should('be.disabled');

// Select just one scope.
cy.get('[data-qa-row="Account"]').within(() => {
cy.get('[type="radio"]').first().click();
});

// Confirm submit button is still disabled without specifying ALL scopes.
ui.buttonGroup
.findButtonByTitle('Create Token')
.scrollIntoView()
.should('be.visible')
.should('be.disabled');

// Specify ALL scopes by selecting the "No Access" Select All radio button.
cy.get('[data-qa-perm-no-access-radio]').click();
cy.get('[data-qa-perm-no-access-radio]').should(
'have.attr',
'data-qa-radio',
'true'
);

// Confirm submit button is enabled; attempt to submit form without specifying a label.
ui.buttonGroup
.findButtonByTitle('Create Token')
.scrollIntoView()
.should('be.visible')
.should('be.enabled')
.click();

// Confirm validation error.
cy.findByText('Label must be between 1 and 100 characters.')
.scrollIntoView()
.should('be.visible');
Expand Down
Loading

0 comments on commit d2187dd

Please sign in to comment.