new: STORIF-310 - Bucket tab filters created.#13481
new: STORIF-310 - Bucket tab filters created.#13481dchyrva-akamai wants to merge 1 commit intolinode:developfrom
Conversation
7d67d23 to
bd33b56
Compare
67b581b to
a35a650
Compare
packages/manager/cypress/e2e/core/objectStorage/object-storage.e2e.spec.ts
Outdated
Show resolved
Hide resolved
| (region) => region.id === selectedBucket.cluster.region | ||
| ); | ||
|
|
||
| const selectedRegionLabel = selectedRegion |
There was a problem hiding this comment.
The test should target a specific scenario - the region should either be defined, or not. In this case, I recommend to fail early in case region is undefined:
expect(selectedRegion, `expected region matching ${selectedBucket.cluster.region}`).to.exist;
There was a problem hiding this comment.
Since new we know that region exists, this line could be simplified to
const selectedRegionLabel = getNewRegionLabel(selectedRegion)
There was a problem hiding this comment.
I am afraid it couldn't, find() method always return T | undefined, the region is 100% there, it is purely a typization issue.
packages/manager/cypress/e2e/core/objectStorage/object-storage.e2e.spec.ts
Outdated
Show resolved
Hide resolved
packages/manager/cypress/e2e/core/objectStorage/object-storage.e2e.spec.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/ObjectStorage/BucketLanding/OMC_BucketLanding.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/ObjectStorage/Partials/RegionMultiselect.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/ObjectStorage/Partials/RegionMultiselect.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/ObjectStorage/Partials/RegionMultiselect.test.tsx
Outdated
Show resolved
Hide resolved
462a2d0 to
88237d2
Compare
d2c44e7 to
e06f0aa
Compare
| <RegionMultiselect | ||
| filterFn={(option) => | ||
| buckets.some((bucket) => bucket.region === option.value) | ||
| } | ||
| onChange={setSelectedRegions} | ||
| showLabel={true} | ||
| sx={{ flex: 1 }} | ||
| values={selectedRegions} | ||
| /> |
There was a problem hiding this comment.
Could we just reuse the RegionMultiSelect that already exists in the codebase?
import { RegionMultiSelect } from 'src/components/RegionSelect/RegionMultiSelect';| <RegionMultiselect | |
| filterFn={(option) => | |
| buckets.some((bucket) => bucket.region === option.value) | |
| } | |
| onChange={setSelectedRegions} | |
| showLabel={true} | |
| sx={{ flex: 1 }} | |
| values={selectedRegions} | |
| /> | |
| <RegionMultiSelect | |
| currentCapability="Object Storage" | |
| fullWidth | |
| isGeckoLAEnabled={false} | |
| noMarginTop | |
| onChange={(values) => | |
| setSelectedRegions(values.map((value) => ({ label: value, value }))) | |
| } | |
| regions={availableStorageRegions.filter((r) => | |
| buckets.some((b) => b.region === r.id) | |
| )} | |
| selectedIds={selectedRegions.map(r => r.value)} | |
| /> |
There was a problem hiding this comment.
Good idea, thank you for the comment.
| return ( | ||
| <Autocomplete | ||
| disabled={isFetching} | ||
| label={showLabel ? 'Region' : ''} |
There was a problem hiding this comment.
From my understanding, we always want a label even if we hide it. This allows us to keep the component accessable. The Autocomplete will handle hiding the label, no need to set it to an empty string
| label={showLabel ? 'Region' : ''} | |
| label="Region" |
There was a problem hiding this comment.
We don't need to display label on the Summary Page, I didn't find any other option to hide the label without modifying the Autocomplete component.
8122e2c to
db338d4
Compare
db338d4 to
5eccaeb
Compare
Cloud Manager UI test results🔺 7 failing tests on test run #20 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/linodes/alerts-create.spec.ts,cypress/e2e/core/objectStorage/object-storage.e2e.spec.ts,cypress/e2e/core/images/search-images.spec.ts,cypress/e2e/core/kubernetes/lke-create.spec.ts" |
|||||||||||||||||||||||||||||||||||
Description 📝
Bucket tab filters created.
Preview 📷
How to test 🧪
pnpm dev./object-storage/bucketspage.Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support
As an Author, before moving this PR from Draft to Open, I confirmed ✅