Some widget interfaces don't inherit IWidget
- Dominant language
- Python
- Stars
- 115
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Currently `IHeadingText` and `IPythonEditor` don't inherit the `IWidget` interface. This isn't critical, as the concrete classes will get the interface from the superclass (eg. `HeadingText` inherits `Widget` which `provides` `IWidget`. However this isn't consistent with other widgets.
Some concrete classes don't match the inheritance suggested by the interfaces: `ProgressDialog` is a `Window` but not a `Dialog`, despite `IProgressDialog` inheriting from `IDialog`. This isn't a problem per-se: interfaces are specifically designed to allow flexibility in implementation as long as the specified methods are present and working as required. So maybe it might be best to not inherit interfaces at all, but then we are relying on implementations specifying _all_ interfaces (so `ProgressDialog`, if it inherits directly from `Window` would need to explicitly declare `IProgressDialog` _and_ `IDialog`).
Whatever the pros or cons, however, should follow one convention or another for the sake of consistency.
Similarly, some things in Tasks, like `ITaskPane` effectively duplicate the `IWidget` interface, but the subclasses don't inherit from`Widget`. Some care may need to be taken here as changing the inheritance of concrete classes may impact the actual behaviour, but on the pro-side, may permit removal of duplicated code.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.