-
Notifications
You must be signed in to change notification settings - Fork 236
feat(compass-saved-aggregations-queries): update query/aggregation COMPASS-5506 #2792
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
Conversation
packages/compass-saved-aggregations-queries/src/components/edit-item-modal.tsx
Outdated
Show resolved
Hide resolved
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.
Overall I think it looks pretty good, there are a bunch of things that caught my eye, but let me know if these don't make too much sense to you
onCancel: () => void; | ||
}; | ||
|
||
const formTitleStyles = css({ |
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.
You can use this code as a reference to how leafygreen styles this component
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.
thanks. made it close to this, except for margin-bottom
. Sticking to a number provided by spacing
that fits.
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.
Sorry, I should've been more clear, I meant like all the modal styles in this file I linked to: we are missing the divider between controls and confirm etc., but it's fine like that too, I have a ticket for creating a modal form component for compass-components, so we can pick it up later (there are a few other places in compass where it needs to be used anyway)
packages/compass-saved-aggregations-queries/src/components/edit-item-modal.tsx
Outdated
Show resolved
Hide resolved
packages/compass-saved-aggregations-queries/src/stores/edit-item.ts
Outdated
Show resolved
Hide resolved
packages/compass-saved-aggregations-queries/src/components/edit-item-modal.tsx
Outdated
Show resolved
Hide resolved
packages/compass-saved-aggregations-queries/src/components/edit-item-modal.tsx
Outdated
Show resolved
Hide resolved
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.
Looks good, a few small comments, but feel free to ignore
onCancel: () => void; | ||
}; | ||
|
||
const formTitleStyles = css({ |
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.
Sorry, I should've been more clear, I meant like all the modal styles in this file I linked to: we are missing the divider between controls and confirm etc., but it's fine like that too, I have a ticket for creating a modal form component for compass-components, so we can pick it up later (there are a few other places in compass where it needs to be used anyway)
import { formatDate } from '../utlis/format-date'; | ||
|
||
export type Action = 'open' | 'delete' | 'copy' | 'rename'; | ||
export type Action = 'open' | 'delete' | 'copy' | 'edit'; |
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.
I'd double-check the name with product just in case. IIRC we wanted it to be "Rename" because "Edit" reads as if you can edit the whole thing, but you can only rename it
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.
Changed it to rename
.
: mapAggregationToItem(action.payload as Aggregation); | ||
return { | ||
...state, | ||
items: [...state.items.filter((x) => x.id !== action.id), updatedItem], |
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.
Total nit, but can be done in one go (instead two iterations)
items: [...state.items.filter((x) => x.id !== action.id), updatedItem], | |
items: state.items.map((item) => { | |
if (item.id === action.id) { | |
return updatedItem; | |
} else { | |
return item | |
} | |
}), |
feat(compass-saved-aggregations-queries): update query/aggregation COMPASS-5506
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes