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

Add Create Menu Item Action #144

Merged
merged 25 commits into from Sep 28, 2023
Merged

Conversation

NoahKamara
Copy link
Contributor

@NoahKamara NoahKamara commented Aug 23, 2023

Fixes #141

To Do

  • Create Intent Logic
  • Add Documentation for Shortcuts.app
  • Move to Intents Extension
  • Add to app-store-description

@NoahKamara NoahKamara marked this pull request as draft August 23, 2023 17:42
@NoahKamara
Copy link
Contributor Author

I figured out a way to implement this without using the contact hack.
A choose from list action will by default show the DisplayRepresentation title subtitle and image so I just implemented it using that

A user can currently choose between Emoji and SF Symbol for the icon as well as apply a background and foreground (only symbol) color

@sindresorhus is there a requirement for using a single app per Action?

@sindresorhus
Copy link
Owner

Thanks for working on this 👍

@sindresorhus
Copy link
Owner

@sindresorhus is there a requirement for using a single app per Action?

By "app", do you mean "file". If so, yes, I would prefer to keep an action and related types in one file. Otherwise it simply ends up being too many files.

@sindresorhus
Copy link
Owner

Code should be tab-indented.

Shared/Actions/Rich Menu/Models/RMStyle.swift Outdated Show resolved Hide resolved
Shared/Actions/Rich Menu/Models/RMStyle.swift Outdated Show resolved Hide resolved
Shared/Actions/Rich Menu/Models/RMShape.swift Outdated Show resolved Hide resolved
Shared/Actions/Rich Menu/Models/RMIconContainer.swift Outdated Show resolved Hide resolved
Shared/Actions/Rich Menu/Models/RMIconContainer.swift Outdated Show resolved Hide resolved
Shared/Actions/Rich Menu/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/Rich Menu/CreateMenuItem.swift Outdated Show resolved Hide resolved
Config.xcconfig Show resolved Hide resolved
@sindresorhus
Copy link
Owner

You have many lint warnings. See the diff.

Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
@muescha
Copy link

muescha commented Sep 2, 2023

readme should also updated at section Included actions

@sindresorhus
Copy link
Owner

I won't be able to try this out until Xcode 15 RC is out, probably in a week.

Actions.xcodeproj/project.pbxproj Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Outdated Show resolved Hide resolved
Shared/Actions/CreateMenuItem.swift Show resolved Hide resolved
app-store-description.txt Show resolved Hide resolved
@sindresorhus
Copy link
Owner

You need to resolve the merge conflict.

@NoahKamara NoahKamara marked this pull request as ready for review September 28, 2023 09:03
@sindresorhus sindresorhus merged commit 5afbb75 into sindresorhus:main Sep 28, 2023
1 check passed
@sindresorhus
Copy link
Owner

Thanks :)

sindresorhus added a commit that referenced this pull request Sep 28, 2023
sindresorhus added a commit that referenced this pull request Sep 28, 2023
@sindresorhus
Copy link
Owner

Btw, this still required substantial clean up: 5455817 In case you are interested in seeing what to improve upon. It was easier to do it afterwards than to comment on everything. I also found a bunch of minor bugs. Some things here are just based on my preference though.

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.

Action proposal: Rich Menu (similar to Toolbox Pro)
3 participants