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

Define widget driver as an interface #128

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

hughns
Copy link
Member

@hughns hughns commented Jan 27, 2025

  • Adds IWidgetDriver interface
  • Renames WidgetDriver to BaseWidgetDriver with old name (WidgetDriver) supported but deprecated

The goal here is to mean that a client that is implementing a driver can more easily see at compile time what is changing between versions.

However, this would mean that we need to change the versioning policy as any addition to IWidgetDriver would be a breaking change (so major version bump). Whereas, at the moment we don't do a major version bump because the abstract WidgetDriver class doesn't require the implementing client to implement anything.

A further thought: if we want to introduce an optional driver method in future, then we can simply make it an optional field on IWidgetDriver itself. That way the ClientWidgetApi is forced to at least consider compatibility.

@hughns hughns changed the title add prettier config Define widget driver as an interface Jan 27, 2025
@hughns hughns force-pushed the hughns/widgetdriver-interface branch from 9af7782 to b858623 Compare January 27, 2025 11:52
Base automatically changed from toger5/prettier-config to master January 27, 2025 12:24
- Adds `IWidgetDriver` interface
- Renames `WidgetDriver` to `BaseWidgetDriver` with old name (`WidgetDriver`) supported but deprecated

The goal here is to mean that a client that is implementing a driver can more easily see at compile time what is changing between versions.

However, this would mean that we need to change the versioning policy as any addition to IWidgetDriver would be a breaking change (so major version bump). Whereas, at the moment we don't do a major version bump because the abstract WidgetDriver class doesn't require the implementing client to implement anything.
@hughns hughns force-pushed the hughns/widgetdriver-interface branch from b858623 to 697ea19 Compare January 27, 2025 14:26
@toger5
Copy link
Contributor

toger5 commented Jan 27, 2025

I like this idea.
Do you agree we should move this after the fixes from: #126
This PR should not change any of the behavior of the the widget-api?

@hughns
Copy link
Member Author

hughns commented Jan 27, 2025

I like this idea.

Do you agree we should move this after the fixes from: #126 This PR should not change any of the behavior of the the widget-api?

Yes, purpose would be to help us less make fewer mistakes in future.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

2 participants