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

rework action #96

Closed
wants to merge 11 commits into from
Closed

rework action #96

wants to merge 11 commits into from

Conversation

timc1
Copy link
Owner

@timc1 timc1 commented Oct 25, 2021

Closes #62.

Rework actions into a separate object so we can keep logic for manipulating actions within a single interface.

This will make:

  • manipulating actions easier
  • enable us to not need to explicitly define both parent/children relationships
  • allow us to test actions separately from the rest of the component logic.

@vercel
Copy link

vercel bot commented Oct 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/timc/kbar/EgdGirZnGMF5bR4HvEqcrfXHMpZW
✅ Preview: https://kbar-git-spike-rework-action-timc.vercel.app

src/types.ts Outdated
Comment on lines 6 to 16
export interface Action {
id: string;
name: string;
shortcut: string[];
keywords: string;
keywords?: string;
shortcut?: string[];
perform?: () => void;
section?: string;
parent?: ActionId | null | undefined;
children?: ActionId[];
children?: ActionImpl[];
icon?: string | React.ReactElement | React.ReactNode;
subtitle?: string;
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

Todo: cleanup types so that it is clear what users need to define themselves, and what is handled implicitly.

@timc1 timc1 force-pushed the spike/rework-action branch from ee6bbb0 to db56019 Compare October 27, 2021 00:07
@timc1 timc1 removed the request for review from tommoor October 27, 2021 01:45
@timc1 timc1 marked this pull request as draft October 27, 2021 01:45
@timc1 timc1 mentioned this pull request Oct 27, 2021
@timc1
Copy link
Owner Author

timc1 commented Oct 27, 2021

See #103

@timc1 timc1 closed this Oct 27, 2021
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.

Remove need to define both parent and children when creating an action
1 participant