feat(vision): save vision queries#9004
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
| @@ -0,0 +1,28 @@ | |||
| import {Box, Stack} from '@sanity/ui' | |||
| import styled from 'styled-components' | |||
There was a problem hiding this comment.
| import styled from 'styled-components' | |
| import {styled} from 'styled-components' |
| <Button | ||
| mode="bleed" | ||
| tone="critical" | ||
| width="fill" | ||
| onClick={(event) => { | ||
| event.stopPropagation() | ||
| deleteQuery(q._key) | ||
| }} | ||
| disabled={deleting.includes(q._key)} | ||
| > | ||
| <Flex align="center" gap={2} padding={1}> | ||
| <Box | ||
| style={{fontSize: '1.25em', display: 'flex', alignItems: 'center'}} | ||
| > | ||
| <TrashIcon /> | ||
| </Box> | ||
| <Text size={1}>{t('action.delete')}</Text> | ||
| </Flex> | ||
| </Button> |
There was a problem hiding this comment.
You can use here menu item instead, and it takes an action so it will give you the menu looking like the studio for free.
See for example this https://github.com/sanity-io/sanity/blob/main/packages/sanity/src/core/comments/components/list/CommentsListItemContextMenu.tsx#L136-L146
pedrobonamin
left a comment
There was a problem hiding this comment.
This is huge improvement, users will be so pleased with this new functionality! Thank you for building this.
Added some suggestions, let me know if you have any questions on them, happy to help get this through the line.
Great work @ChrisLaRocque appreciate it! Would love to see more contributions like this 😄
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
pedrobonamin
left a comment
There was a problem hiding this comment.
Looks great @ChrisLaRocque , fantastic work!!
I really appreciate the extra effort getting it through the line, this such a nice addition to vision.
This should be into the highlights for next release.
Thank you!!
Description
Provides the ability to save and recall previously ran queries by individual users via a secret document.
This change was built in response to customer feedback of wanting a way to recall previously ran queries in Vision.
What to review
Testing
Notes for release