[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
gerritbot added a comment. Change 274731 merged by jenkins-bot: Add view-factory-callback to the entity type definitions https://gerrit.wikimedia.org/r/274731 TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, gerritbot Cc: daniel, Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, Lewizho99, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
daniel added a comment. Waiting for related change: https://gerrit.wikimedia.org/r/#/c/274731/ TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, daniel Cc: daniel, Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
gerritbot added a comment. Change 274731 had a related patch set uploaded (by Bene): Add view-factory-callback to the entity type definitions https://gerrit.wikimedia.org/r/274731 TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, gerritbot Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
gerritbot added a comment. Change 274393 merged by jenkins-bot: Dispatch entity views based on callbacks https://gerrit.wikimedia.org/r/274393 TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, gerritbot Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
gerritbot added a comment. Change 274393 had a related patch set uploaded (by Bene): Dispatch entity views based on callbacks https://gerrit.wikimedia.org/r/274393 TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, gerritbot Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
gerritbot added a comment. Change 271345 merged by jenkins-bot: Move entity type dispatching out of WikibaseView https://gerrit.wikimedia.org/r/271345 TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, gerritbot Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
adrianheine added a comment. In https://phabricator.wikimedia.org/T127191#2079460, @Bene wrote: > `TemplateFactory` doesn't seem to serve a purpose here because we cannot inject other templates from another component/extension. It might be nice to make that class modular to be able to support other template files as well but for now it isn't useful for any other extensions. Sure, but what does that have to do with the point here? TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, adrianheine Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
Bene added a comment. `TemplateFactory` doesn't seem to serve a purpose here because we cannot inject other templates from another component/extension. It might be nice to make that class modular to be able to support other template files as well but for now it isn't useful for any other extensions. TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
adrianheine added a comment. But `TemplateFactory` is constructed in `WikibaseRepo` via `TemplateFactory::getDefaultInstance()` and then injected into `EntityViewFactory`. The same could be done for a `MediaInfoViewFactory`. TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, adrianheine Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
Bene added a comment. @adrianheine mainly because they need access to the TemplateFactory which isn't available outside of Wikibase. TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
adrianheine added a comment. In https://phabricator.wikimedia.org/T127191#2054679, @Bene wrote: > I'd also add factory methods for the `StatementSectionsView` and `EntityTermsView` because extensions of Wikibase defining new entity types want to reuse those views. Why is a factory method necessary for them? They can just be instantiated in the factory method creating the view. TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, adrianheine Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
Bene added a comment. In https://phabricator.wikimedia.org/T127191#2039646, @adrianheine wrote: > From my point of view, `WikibaseView` is a component providing widgets for a specific set of `WikibaseDataModel` concepts. Since the widgets for items and properties use all other widgets, we provide an `EntityViewFactory` wiring them together. `Wikibase\View\EntityViewFactory` could look like the following for all I (aka `WikibaseView`) care about: > > EntityViewFactory > __construct() > newItemView( ...allTheServicesAndValues ): ItemView > newPropertyView( ...allTheServicesAndValues ): PropertyView > I'd also add factory methods for the `StatementSectionsView` and `EntityTermsView` because extensions of Wikibase defining new entity types want to reuse those views. > Also, `WikibaseView` should define an `EntityView` interface: > > EntityView > getTitleHtml( Entity ): HtmlString > getHtml( Entity ): HtmlString > getPlaceholders(): mixed[] This is almost what `EntityView` currently does. We can however refactor this and define a new public interface of `EntityView` which doesn't contain the protected abstract functions for main and side HTML. > With that, `WikibaseView` seems done to me. > > `WikibaseRepo` (namely `EntityParserOutputGenerator`) on the other hand needs something where it can just put in an entity type and a few other things and get a view. That factory thing should be defined in `WikibaseRepo`, instantiated in `WikibaseRepo.php` based on config, and passed to `EntityParserOutputGenerator`. It would use `Wikibase\View\EntityViewFactory`. I agree on that. TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene Cc: Bene, adrianheine, gerritbot, Aklapper, StudiesWorld, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
adrianheine added a comment. From my point of view, `WikibaseView` is a component providing widgets for a specific set of `WikibaseDataModel` concepts. Since the widgets for items and properties use all other widgets, we provide an `EntityViewFactory` wiring them together. `Wikibase\View\EntityViewFactory` could look like the following for all I (aka `WikibaseView`) care about: EntityViewFactory __construct() newItemView( ...allTheServicesAndValues ): ItemView newPropertyView( ...allTheServicesAndValues ): PropertyView Also, `WikibaseView` should define an `EntityView` interface: EntityView getTitleHtml( Entity ): HtmlString getHtml( Entity ): HtmlString getPlaceholders(): mixed[] With that, `WikibaseView` seems done to me. `WikibaseRepo` (namely `EntityParserOutputGenerator`) on the other hand needs something where it can just put in an entity type and a few other things and get a view. That factory thing should be defined in `WikibaseRepo`, instantiated in `WikibaseRepo.php` based on config, and passed to `EntityParserOutputGenerator`. TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, adrianheine Cc: adrianheine, gerritbot, Aklapper, StudiesWorld, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T127191: [Task] Allow extensions to register additonal EntityViews
gerritbot added a subscriber: gerritbot. gerritbot added a comment. Change 271345 had a related patch set uploaded (by Bene): Allow injection of entity views https://gerrit.wikimedia.org/r/271345 TASK DETAIL https://phabricator.wikimedia.org/T127191 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Bene, gerritbot Cc: gerritbot, Aklapper, StudiesWorld, Izno, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs