-
Notifications
You must be signed in to change notification settings - Fork 120
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
That’s not my name #3048
That’s not my name #3048
Conversation
[*.html] | ||
indent_size = 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this to make my editor happy, but happy to drop this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must have a wide screen 😅 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working full screen with 1440 pixels. That 4 spaces is in line with what's currently used in the Angular html
files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, let's add some tests.
@@ -20,15 +20,15 @@ describe('metadataDiff', () => { | |||
it("finds a changed string field in the presence of an array", () => { | |||
const initial = { field: "value", array1: ["value 2"] }; | |||
const changed = { field: "changed", array2: ["value 2"] }; | |||
const expected = { field: "changed" }; | |||
const expected = { field: "changed", array1: "", array2: ["value 2"] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't array1
be absent from expected
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we array1
should return an empty array. In any case, I’ve updated the tests.
value.map { case(k, v) => (k, if (v == "") null else v) } | ||
.foreach { case(k, v) => valueMap.withString(k, v) } | ||
value.map { case(k, v) => (k, if (v == JsNull) null else v) } | ||
.foreach { case(k, v) => valueMap.withJSON(k, Json.stringify(v)) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to have some tests against this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akash1810 I think this is done now?
Grid CI / ScalaBuild (pull_request) failed on |
Co-Authored-By: Akash Askoolum <[email protected]>
👍 Happy with this, have seen it on TEST and it's writing sensible things to the database. @akash1810 are you happy with the tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is great! Not least because it addresses a ~5 year issue!
Works as described on TEST; perhaps @paperboyo wants to give it a final try? We should also send some comms out via Central Production.
This is also likely to be of interest to BBC so cc @ochiengolanga and @wainaina. We can also bring it up at our next meeting.
[*.html] | ||
indent_size = 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must have a wide screen 😅 .
Him did already. Works a treat!
Defo! cc @marianadiaspereira
Would that be editing arrays?
Yeah, they have this cool thing (although I can’t tell which fields are possible to add and if |
Seen on auth, cropper, collections, kahuna, image-loader-projection, metadata-editor, leases (created by @mxdvl and merged by @paperboyo 10 minutes and 44 seconds ago) Please check your changes! |
Seen on usage, image-loader, media-api (created by @mxdvl and merged by @paperboyo 10 minutes and 49 seconds ago) Please check your changes! |
What does this change?
Adds the ability to edit the People in an image. Developed with @zeek01 as part of Hack Day 2020.
Some of the “prompted change” alluded to in Mistakes with identities have dismayed our readers – and prompted change.
This required to change the underlying Scala type from
Map[String, String]
→Map[String, JsValue]
. Theservice.js
also handle thepeopleInImage
field differently than other.How can success be measured?
Picture editors should be able to correct this metadata if it is wrong.
Screenshots
Who should look at this?
@paperboyo, @akash1810, @guardian/digital-cms
Tested?