Skip to content
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

Admin UI: Improvements to Update workflow #2871

Merged
merged 5 commits into from
May 5, 2020

Conversation

Vultraz
Copy link
Contributor

@Vultraz Vultraz commented May 1, 2020

  • Converted UpdateManyModal to a functional component. Dropped UpdateManyModalWithMutation in the process.
  • Cleaned up ListManage a bit
  • Surface update errors in a toast. Same behavior as the Create modal
  • Ensured an error wouldn't dismiss the Update popout
  • Fixed an error making it impossible to deselect the final selected field

@changeset-bot
Copy link

changeset-bot bot commented May 1, 2020

🦋 Changeset is good to go

Latest commit: 12ddf55

We got this.

This PR includes changesets to release 1 package
Name Type
@keystonejs/app-admin-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -383,7 +383,7 @@ const ActionItems = ({ mouseIsOverNav }) => {
...(ENABLE_DEV_FEATURES
? [
{
label: 'GraphiQL Playground',
label: 'GraphQL Playground',
Copy link
Contributor Author

@Vultraz Vultraz May 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, I just learned that GraphiQL =/= GraphQL Playground.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¯_(ツ)_/¯ OK

@Vultraz Vultraz changed the title Improvements to Update workflow Admin UI: Improvements to Update workflow May 1, 2020
const { onDeleteMany, onUpdateMany, selectedItems } = props;
const [deleteModalIsVisible, setDeleteModal] = useState(false);
const [updateModalIsVisible, setUpdateModal] = useState(false);
const SelectedCount = styled.div`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we change to template functions here? We use object notation throughout most of the codebase. I'd rather be consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no consistent usage of styled object notation vs template literals. Lot of both. I've been gradually switching to the latter as I've come across it. Haven't touched the function-based ones since I only yesterday realized that they can return a template literal too 😬

@MadeByMike
Copy link
Contributor

I still like the idea of keeping the updateItem function separate from the UI. The real problem is we need some more basic UI components here rather than this large mess.

I'm inclined to move forward with this for now

@timleslie timleslie merged commit 5e20df8 into keystonejs:master May 5, 2020
@Vultraz Vultraz deleted the admin-ui-update-modal-stuff branch May 5, 2020 01:42
This was referenced May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants