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

Update plugin architecture #209

Merged
merged 17 commits into from
Nov 1, 2022
Merged

Conversation

dalyIsaac
Copy link
Owner

@dalyIsaac dalyIsaac commented Nov 1, 2022

Core

  • Renamed ICommandItemContainer.Add(string commandIdentifier, ...) to ICommandItemContainer.SetKeybind(string commandIdentifier, ...). This better reflects the method's purpose.
  • Added tests for the core commands.

Plugins

  • Plugins now all have unique names. This is enforced by the PluginManager.
  • IPlugin.GetCommands is now IPlugin.Commands.
  • Plugins which provide commands via IPlugin.Commands also have a class PluginNameCommands, where each command is individually accessible. This makes them easier to test.
  • Added tests for all the PluginNameCommands classes.
  • Refactored plugins to have their own interfaces. This facilitates mocking for testing.

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly
@dalyIsaac dalyIsaac added core Whim command palette Whim.CommandPalette floating windows Whim.FloatingWindow gaps Whim.Gaps focus indicator Whim.FocusIndicator labels Nov 1, 2022
@dalyIsaac dalyIsaac linked an issue Nov 1, 2022 that may be closed by this pull request
13 tasks

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly

Verified

This commit was signed with the committer’s verified signature.
dalyIsaac Isaac Daly
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2022

Codecov Report

Base: 42.66% // Head: 46.34% // Increases project coverage by +3.68% 🎉

Coverage data is based on head (0bcf980) compared to base (e6ec965).
Patch coverage: 78.41% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
+ Coverage   42.66%   46.34%   +3.68%     
==========================================
  Files          89       98       +9     
  Lines        4360     4646     +286     
  Branches      559      577      +18     
==========================================
+ Hits         1860     2153     +293     
+ Misses       2402     2392      -10     
- Partials       98      101       +3     
Impacted Files Coverage Δ
src/Whim.CommandPalette/CommandPalettePlugin.cs 0.00% <0.00%> (ø)
src/Whim.FloatingLayout/FloatingLayoutPlugin.cs 0.00% <0.00%> (ø)
src/Whim/Commands/CommandItemContainer.cs 90.42% <ø> (ø)
src/Whim/Commands/CommandManager.cs 0.00% <0.00%> (ø)
src/Whim/ConfigContext/ConfigContext.cs 0.00% <0.00%> (ø)
src/Whim/Plugin/PluginManager.cs 0.00% <0.00%> (ø)
src/Whim.Gaps/GapsPlugin.cs 70.00% <57.14%> (ø)
src/Whim.FloatingLayout/FloatingLayoutCommands.cs 82.85% <82.85%> (ø)
src/Whim.Gaps/GapsCommands.cs 84.09% <84.09%> (ø)
src/Whim/Commands/CoreCommands.cs 86.04% <86.04%> (ø)
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dalyIsaac dalyIsaac marked this pull request as ready for review November 1, 2022 04:12
@dalyIsaac dalyIsaac added refactor The code can be simplified/moved/cleaned up tests Tests... labels Nov 1, 2022
@dalyIsaac dalyIsaac merged commit d5bcdcf into main Nov 1, 2022
@dalyIsaac dalyIsaac deleted the 201-all-plugins-should-have-unique-names branch November 1, 2022 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command palette Whim.CommandPalette core Whim floating windows Whim.FloatingWindow focus indicator Whim.FocusIndicator gaps Whim.Gaps refactor The code can be simplified/moved/cleaned up tests Tests...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update plugin architecture
2 participants