Page MenuHomePhabricator

Finalize reading list metadata schema
Closed, ResolvedPublic

Description

The reading_list table has a couple somewhat ad hoc fields like color or icon. Changing the DB schema for those fields is easy before hitting production but will become more troublesome after that. We should probably nail down the semantics now. The current semantics are (note that everything here is in bytes; most non-ASCII characters take two bytes, some might take three):

  • name: 255 bytes
  • description: 767 bytes
  • color: 6 bytes (assumed to be hexa RGB codes, but no validation)
  • image: 255 bytes (unclear if this will be an URL or Commons file name or something else)
  • icon: 32 bytes (unclear if this will be an URL or Commons file name or a predefined dictionary or something else)

(Also, rle_title needs to be larger to account for the namespace. This does not need to be finalized, just done, but it can be done in the same batch of updates.)

Provisional new schema:

  • name: 511 bytes
  • description: 767 bytes
  • color: drop
  • image: drop
  • icon: 32 bytes?

Event Timeline

Tgr created this task.Nov 9 2017, 1:15 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr updated the task description. (Show Details)Nov 9 2017, 6:41 AM
Tgr updated the task description. (Show Details)Nov 11 2017, 11:36 PM
Tgr added subscribers: Mholloway, Dbrant, JoeWalsh, Fjalapeno.

@Dbrant @JoeWalsh any chance you could look at this? It would save me some effort if I could get it done before production deployment (I'm targeting two weeks from now).

@Dbrant on the android side, are you using color, image, or icon? That's not in the designs on our end, so they might be removable. cc @JMinor

JMinor added a subscriber: RHo.Nov 27 2017, 8:13 PM

Adding @RHo since I think these originated with her Android designs. From iOS side we are not planning to use color or image fields. Icon seems like it might be useful.

(Also 255 bytes might be tight for unicode languages.)

JMinor added a subscriber: cmadeo.

Nope, we're not using color or icon.

Agree that 255 bytes is a bit small. I'm already unable to add the name of my favorite fictional dish...

Tgr added a comment.Nov 27 2017, 8:44 PM

The list name length matches the article title length currently (for no particular reason); any recommendations what it should be? λοπαδοτεμαχοσελαχογαλεοκρανιολειψανοδριμυποτριμματοσιλφιοκαραβομελιτοκατακεχυμενοκιχλεπικοσσυφοφαττοπεριστεραλεκτρυονοπτοκεφαλλιοκιγκλοπελειολαγῳοσιραιοβαφητραγανοπτερύγων is 343 bytes; should we go with something like 500 bytes? 1000? What about the description, is that expected to be very long?

@Dbrant are you using image?

RHo added a comment.Nov 28 2017, 8:28 PM

@Dbrant to confirm but I believe we may be using image for the top part of a reading list details screen (as a larger version of the article thumbnail for up to the first 6 articles in a list):

@RHo No, that's actually a composite of the images that we receive from the article summary data. So, I don't believe we're actually using the image item, either.

@Tgr 500 bytes (511?) sounds more comfortable for the name, and I think the current 767 bytes is sufficient for the description.

Tgr updated the task description. (Show Details)Nov 28 2017, 9:53 PM
Tgr added a comment.Nov 28 2017, 10:00 PM

@Fjalapeno is it OK to drop image and color from the schema?
@JMinor does 32 bytes look OK for icon? The original spec called for URLs but I would rather not do that unless we really want to fetch icons from random locations on the web; no reason spend DB space on having a million fields start with https:en.wikipedia.org/resources/ or whatever.

@Tgr we're not using icon on iOS, so image, color and icon can all be dropped

@Tgr dropping them is all cool… those were old design ideas that never materialized…

Change 395666 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/ReadingLists@master] Discard unused metadata from schema

https://gerrit.wikimedia.org/r/395666

Change 395673 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/ReadingLists@master] Increase rl_title length to account for namespace

https://gerrit.wikimedia.org/r/395673

Tgr moved this task from Backlog to Coming soon on the Reading List Service board.Dec 6 2017, 12:40 AM

Change 395666 merged by jenkins-bot:
[mediawiki/extensions/ReadingLists@master] Discard unused metadata from schema

https://gerrit.wikimedia.org/r/395666

Change 395673 merged by jenkins-bot:
[mediawiki/extensions/ReadingLists@master] Increase rl_title length to account for namespace

https://gerrit.wikimedia.org/r/395673

Tgr closed this task as Resolved.Dec 6 2017, 8:53 PM
Tgr claimed this task.

Change 396110 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/ReadingLists@wmf/1.31.0-wmf.10] Discard unused metadata from schema

https://gerrit.wikimedia.org/r/396110

Change 396111 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/ReadingLists@wmf/1.31.0-wmf.10] Increase rl_title length to account for namespace

https://gerrit.wikimedia.org/r/396111

Change 396118 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/ReadingLists@wmf/1.31.0-wmf.11] Discard unused metadata from schema

https://gerrit.wikimedia.org/r/396118

Change 396119 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/ReadingLists@wmf/1.31.0-wmf.11] Increase rl_title length to account for namespace

https://gerrit.wikimedia.org/r/396119

Change 396110 merged by jenkins-bot:
[mediawiki/extensions/ReadingLists@wmf/1.31.0-wmf.10] Discard unused metadata from schema

https://gerrit.wikimedia.org/r/396110

Change 396111 merged by jenkins-bot:
[mediawiki/extensions/ReadingLists@wmf/1.31.0-wmf.10] Increase rl_title length to account for namespace

https://gerrit.wikimedia.org/r/396111

Change 396118 merged by jenkins-bot:
[mediawiki/extensions/ReadingLists@wmf/1.31.0-wmf.11] Discard unused metadata from schema

https://gerrit.wikimedia.org/r/396118

Change 396119 merged by jenkins-bot:
[mediawiki/extensions/ReadingLists@wmf/1.31.0-wmf.11] Increase rl_title length to account for namespace

https://gerrit.wikimedia.org/r/396119