close
Skip to content

Seahorse#11

Draft
addshore wants to merge 17 commits into
masterfrom
seahorse
Draft

Seahorse#11
addshore wants to merge 17 commits into
masterfrom
seahorse

Conversation

@addshore

@addshore addshore commented Sep 6, 2022

Copy link
Copy Markdown
Owner

No description provided.

This entity just contains a string.
I am not implementing all of the needed things yet,
so that I can work through the creation process and
see the minimum set of required things.

So far this commit
a) adds a class that extends EntityDocument (required)
but there are ways this interface could be reduced
b) adds an ID, that is just a simple string (required)
again, this interface could be simplified
c) adds a special page so that I would be able to try and
create the entity.
Note: It would have been nicer to be able to say that an entity
type brings an interface with it, instead of needing to add this
to WikibaseRepo extension.json directly

Change-Id: Ia1750a56fd70d6a9699e592a6805ddb61bcf8428
ERROR 1:
No content handler defined for entity type sea-horse-entity-type

The Content handler connects Wikibase and entiities into MediaWiki.
To persist things this will have a bunch of other stuff that needs adding.

Change-Id: Ia93d7c10a9e1c6fe7cdb271f8f28c6870b87311a
The next error was:
The given PageIdentity Special:Badtitle/NS4269:361d048c2506cd65cec4490edfdbe198
does not represent a proper page
in MediaWiki\Page\WikiPageFactory->newFromTitle()

So when the page is trying to be saved, mediawiki complains...

Change-Id: Ia2f81a69483251701f024a496cfd757099fec1a7
Change-Id: I563809050a05cc25fff1b58571ad2e916860f1ac
Change-Id: I7558aad25dc53c360f0bf175b44779a371c0c532
Change-Id: I3d8d75934037051af103ed8257aed534d5249553
@addshore addshore marked this pull request as draft September 6, 2022 20:51
@addshore

addshore commented Sep 6, 2022

Copy link
Copy Markdown
Owner Author

At this point in the tree, you can create a basic entity with some string content
The entity is called "seahorse" because why not...

Navigate to the special page http://default.mediawiki.mwdd.localhost:8080/w/index.php?title=Special:Foal
enter some text and hit create
image

This will use the low level entity store to just make the entity
f2c65c4#diff-e7978b6c9dc8685f28f39f5d23cab14524232b2955139a4258eee03dff2eed6fR64-R69

and redirect you to recent changes

image

None of the reading or rendering side is done yet, so pages are not visible.

image

But generally integration with MediaWiki is done
image

I would describe this state as something like:

Change-Id: Iedef018fb2612e7d02b0033c4ca20f292d8213f1
Change-Id: Ib45ebac2343eb5b12e556c44ae83323c86abcea3
Change-Id: I670d270a13c90c2d446d6333de9152c488219bdc
@addshore

addshore commented Sep 7, 2022

Copy link
Copy Markdown
Owner Author

The entity is now viewable with custom HTML rendering

image

Interestingly adding the viewability part actually broke recent changes....

Unable to find Wikibase\DataAccess\PrefetchingTermLookup Service callback for Entity Type onestring-entity-type for Source local

@addshore

addshore commented Sep 7, 2022

Copy link
Copy Markdown
Owner Author

After 7c01dee recent changes is once again fixed
(github put my commit and comment in the wrong order?)

image

Change-Id: I4a5b84456ccb3354f87f2edbb249e6afca1f019b
Change-Id: Ia2889e614df1e3d70d89e7988a5e5d9cd566d6e3
Change-Id: I882ce1ba7b3d8756cf26dde63463ed16e0dd6d1f
@addshore

addshore commented Sep 7, 2022

Copy link
Copy Markdown
Owner Author

This entity now has a baseline implementation of having "fingerprints", making use of the already existing datamodel classes (even thought they are slightly cubersome in their current state) hence a small bit of refactoring along the way.

There is also a custom display of this fingerprint.
As this is a demo, im going to only focus on the en label...

image

So the creation page has also altered slightly

image

This is somewhat similar to EntitySchemas right now?
(I'd have to go and double check)

@addshore

addshore commented Sep 7, 2022

Copy link
Copy Markdown
Owner Author

Again github is doing things out of order....
But this commit 2c5cc0c adds link formatting in places like recent changes

image

Note that labeldata is not yet populated 2c5cc0c#diff-c3a82eefebb31e23dbbf2673e224ad17d37a6fc04deba235a7a3999e88ed16e7R9 probably because we didn't define a way to look it up...

Change-Id: I5290c6d4da89287c211ab63183d14b6ab4f78211
@addshore

addshore commented Sep 7, 2022

Copy link
Copy Markdown
Owner Author

The last commit adds 1 more part to entity type definitions, and 1 more part to the ID class, and now general things that act on labels, such as wbsetlabel just work.

image
image

And so do the special pages
image
image

Change-Id: I741968266104ae2bf2d088ffdaf02e7a12c13bb1
@addshore

addshore commented Sep 7, 2022

Copy link
Copy Markdown
Owner Author

Now a public serialization is defined, the entity is visible via public apis, in the expected way when it comes to users of wikibase

image

This was broken before now, as my ID has lower case letters in it
EntityDataUriManager always upper cased IDs, which actually means
that lookups would no longer be able to find them...
This behaviour is probably only wanted for OLDER entities? and should
probably be implemented somewhere else..

Change-Id: Ia439afac127447fa7999f27597ea162cbe0c6e24
Change-Id: I575b5f1709558f45f1e70e6cf175dc6428d9cf5b
@addshore

addshore commented Sep 7, 2022

Copy link
Copy Markdown
Owner Author

Before the commit there was basic entity RDF, but nothing from the content

image

Post commit you can see what we have added

image

Change-Id: I2a645d99d981c8bed42f2892f7dc7a62037f54aa
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.

1 participant