#metabrainz

/

      • yvanzo has quit
      • 2020-04-28 11958, 2020

      • d4rkie has quit
      • 2020-04-28 11941, 2020

      • D4RK-PH0ENiX joined the channel
      • 2020-04-28 11949, 2020

      • CatQuest
        Freso: we need sigyn again
      • 2020-04-28 11914, 2020

      • yvanzo joined the channel
      • 2020-04-28 11915, 2020

      • supersandro20006 joined the channel
      • 2020-04-28 11954, 2020

      • supersandro2000 has quit
      • 2020-04-28 11953, 2020

      • Chinmay3199 has quit
      • 2020-04-28 11952, 2020

      • Sigyn joined the channel
      • 2020-04-28 11952, 2020

      • Sigyn
        ** Warning: if there is any bot in #metabrainz which should be exempted from Sigyn, contact staffers before it gets caught **
      • 2020-04-28 11902, 2020

      • reosarevok
        Seems gone by now but just in case
      • 2020-04-28 11944, 2020

      • shivam-kapila joined the channel
      • 2020-04-28 11915, 2020

      • yvanzo has quit
      • 2020-04-28 11940, 2020

      • BrainzGit has quit
      • 2020-04-28 11902, 2020

      • BrainzGit joined the channel
      • 2020-04-28 11926, 2020

      • yvanzo joined the channel
      • 2020-04-28 11952, 2020

      • shivam-kapila has quit
      • 2020-04-28 11922, 2020

      • thomasross has quit
      • 2020-04-28 11951, 2020

      • thomasross joined the channel
      • 2020-04-28 11931, 2020

      • jmp_music joined the channel
      • 2020-04-28 11941, 2020

      • prabal joined the channel
      • 2020-04-28 11953, 2020

      • yvanzo
        mo’’in’
      • 2020-04-28 11900, 2020

      • ruaok
        mo'''in!
      • 2020-04-28 11946, 2020

      • Mr_Monkey
        Moin !
      • 2020-04-28 11903, 2020

      • alastairp
        ruaok: Mr_Monkey: hi!
      • 2020-04-28 11917, 2020

      • Mr_Monkey
        Beep boop
      • 2020-04-28 11924, 2020

      • alastairp
        I have a question about naming things that I'd like to run past you...
      • 2020-04-28 11902, 2020

      • Gazooo has quit
      • 2020-04-28 11905, 2020

      • alastairp
        I'm merging aidanlw17's API endpoint to select individual features (e.g. key, bpm) from a lowlevel document. we need a path for it
      • 2020-04-28 11906, 2020

      • ruaok
      • 2020-04-28 11920, 2020

      • alastairp
        currently it's /api/v1/low-level/indivdual (for individual feature)
      • 2020-04-28 11936, 2020

      • alastairp
        I'm not sure I like it. Does /api/v1/low-level/feature feel better to you?
      • 2020-04-28 11947, 2020

      • ruaok
        yes
      • 2020-04-28 11902, 2020

      • ruaok
        its RESTier
      • 2020-04-28 11947, 2020

      • alastairp
        mmm, to clarify, a request will be /api/v1/low-level/feature?recording_ids=mbid1;mbid2;mbid3&features=bpm;key
      • 2020-04-28 11947, 2020

      • Gazooo joined the channel
      • 2020-04-28 11917, 2020

      • shivam-kapila joined the channel
      • 2020-04-28 11920, 2020

      • alastairp
        the recording_ids= query param is already standardised in our bulk lowlevel/highlevel endpoints
      • 2020-04-28 11920, 2020

      • ruaok
        ah. do you need a whole new endpoint for that?
      • 2020-04-28 11930, 2020

      • alastairp
        oh, that's an interesting question
      • 2020-04-28 11937, 2020

      • alastairp
        merge it into the bulk get endpoint?
      • 2020-04-28 11942, 2020

      • ruaok
        yeah.
      • 2020-04-28 11900, 2020

      • ruaok
        it is fetching the same data, just a more constricted point.
      • 2020-04-28 11910, 2020

      • alastairp
        yeah
      • 2020-04-28 11923, 2020

      • alastairp
        and we did make the effort to make the structure the same, just with less data
      • 2020-04-28 11945, 2020

      • alastairp
        sounds good, thanks
      • 2020-04-28 11912, 2020

      • ruaok
        np
      • 2020-04-28 11912, 2020

      • Mr_Monkey
        I agree, same endpoints sound like the best way
      • 2020-04-28 11957, 2020

      • yvanzo
        bitmap, reosarevok: installed welcome bot on mbs repo, thanks to Mr_Monkey for the suggestion :)
      • 2020-04-28 11908, 2020

      • reosarevok
        What's a welcome bot?
      • 2020-04-28 11911, 2020

      • Mr_Monkey
        Nice
      • 2020-04-28 11920, 2020

      • reosarevok
        Some "hi, thanks for your first PR" thing?
      • 2020-04-28 11902, 2020

      • Mr_Monkey
      • 2020-04-28 11904, 2020

      • Mr_Monkey
        Yes
      • 2020-04-28 11942, 2020

      • yvanzo
        A game changer in our world domination plan!
      • 2020-04-28 11943, 2020

      • yvanzo
        Also, I'm checking how to create a .github repo so that we don't have to create CODE_OF_CONDUCT.md and such for every repo in our org.
      • 2020-04-28 11929, 2020

      • v6lur joined the channel
      • 2020-04-28 11941, 2020

      • Chinmay3199 joined the channel
      • 2020-04-28 11925, 2020

      • Chinmay3199
        Mr_Monkey: Can you tell how did we set VIAF and IMDb identifier for work 'The Martian' (https://beta.bookbrainz.org/work/7b5e4cad-2cb1-4d…) at the first place when there shouldn't have been an option to add IMDb and VIAF as identifiers while creating the work.
      • 2020-04-28 11925, 2020

      • Mr_Monkey
        Hi Chinmay3199! Those identifiers were set a while back, where there was no constraints to what entity an identifier could be applied to, I suppose (that was before my time)
      • 2020-04-28 11939, 2020

      • Mr_Monkey
        That's where the cleanup comes in :)
      • 2020-04-28 11902, 2020

      • Chinmay3199
        Oh got it now. Thanks!
      • 2020-04-28 11942, 2020

      • iliekcomputers starts work on github bot thats takes jira tickets and solves them
      • 2020-04-28 11944, 2020

      • d4rkie joined the channel
      • 2020-04-28 11915, 2020

      • D4RK-PH0ENiX has quit
      • 2020-04-28 11934, 2020

      • reosarevok
        bitmap (or yvanzo): if you have some time to look at Cyna's open PR, would be nice to see if you also think it's ready :)
      • 2020-04-28 11940, 2020

      • reosarevok
        (or if I missed something)
      • 2020-04-28 11927, 2020

      • alastairp
        iliekcomputers: that's a pretty good one
      • 2020-04-28 11900, 2020

      • shivam-kapila
        A lot of BotBrainz in the past 2 days :)
      • 2020-04-28 11938, 2020

      • yvanzo
        reosarevok: there is an inconsistent use of addColonText, should we stop using it already?
      • 2020-04-28 11950, 2020

      • reosarevok
        Why would we?
      • 2020-04-28 11951, 2020

      • yvanzo
        (stop adding it at least)
      • 2020-04-28 11917, 2020

      • reosarevok
        I'd like to use it everywhere where we know there should be a string only, isn't that the point? Better typing?
      • 2020-04-28 11954, 2020

      • reosarevok
        Unless we agree we don't want it at all and then we should just mass-change it to addColon
      • 2020-04-28 11934, 2020

      • yvanzo
      • 2020-04-28 11938, 2020

      • yvanzo
        I'm not convinced we should stop using addColon/addColonText either, but it should be investigated for MBS-10739.
      • 2020-04-28 11939, 2020

      • BrainzBot
        MBS-10739: Document writing context strings for developers https://tickets.metabrainz.org/browse/MBS-10739
      • 2020-04-28 11957, 2020

      • yvanzo
        Maybe if we can provide a general context to colon addition (row header?), that would be fine to still use it.
      • 2020-04-28 11919, 2020

      • yvanzo
        (The “inconsistent use” is in the PR you just asked to review.)
      • 2020-04-28 11916, 2020

      • reosarevok
        There's a case there where I asked to add it only where it wouldn't require a new translation
      • 2020-04-28 11919, 2020

      • reosarevok
        If that's what you mean :)
      • 2020-04-28 11946, 2020

      • yvanzo
        Ok, thank you.
      • 2020-04-28 11903, 2020

      • reosarevok
        (I would rather we used it everywhere or nowhere, but that's easy to change all in one go in either direction if we so choose)
      • 2020-04-28 11920, 2020

      • reosarevok
        (since if we decide to add more context we would need to change them either way)
      • 2020-04-28 11911, 2020

      • yvanzo
        (I agree, everywhere or nowhere, but we should definitely be able to add context string to it if we use it everywhere.)
      • 2020-04-28 11945, 2020

      • yvanzo
        assertEval target="window.document.getElementsByClassName('edit-list').length" value="1".#62 should be equal
      • 2020-04-28 11907, 2020

      • yvanzo
        this failure ^ is usually not relevant, right?
      • 2020-04-28 11911, 2020

      • reosarevok
        That's the one that keeps breaking, yes
      • 2020-04-28 11921, 2020

      • reosarevok
        bitmap: which of your PRs had the code to deactivate it?
      • 2020-04-28 11954, 2020

      • BrainzGit
        [musicbrainz-server] yvanzo merged pull request #1424 (master…edit-release-group): MBS-10400 Convert Edit Release Group edit to React https://github.com/metabrainz/musicbrainz-server/…
      • 2020-04-28 11955, 2020

      • BrainzBot
        MBS-10400: Convert Edit Release Group edit to React https://tickets.metabrainz.org/browse/MBS-10400
      • 2020-04-28 11918, 2020

      • reosarevok
        !m yvanzo
      • 2020-04-28 11918, 2020

      • BrainzBot
        You're doing good work, yvanzo!
      • 2020-04-28 11902, 2020

      • alastairp
        Mr_Monkey: hi
      • 2020-04-28 11903, 2020

      • alastairp
      • 2020-04-28 11913, 2020

      • BrainzGit
        [musicbrainz-server] reosarevok opened pull request #1481 (master…MBS-10791): MBS-10791: Convert historic Change RG edit to React https://github.com/metabrainz/musicbrainz-server/…
      • 2020-04-28 11915, 2020

      • BrainzBot
        MBS-10791: Convert historic Change RG edit to React https://tickets.metabrainz.org/browse/MBS-10791
      • 2020-04-28 11930, 2020

      • alastairp
        here, I'm calling setState, and then a few lines later calling addMbid, but what I'm seeing is that in addMbid, the value of this.state.mbid is the _previous_ state
      • 2020-04-28 11919, 2020

      • Mr_Monkey
        setState is an asynchronous function, and it accepts an optional callback once the state has been set
      • 2020-04-28 11930, 2020

      • alastairp
        oooo, that's new to me
      • 2020-04-28 11932, 2020

      • Mr_Monkey
        I forget the exact signature in that case, give me a sec
      • 2020-04-28 11949, 2020

      • alastairp
        ahhh, this worked in the old version because I was using refs, not state
      • 2020-04-28 11948, 2020

      • Mr_Monkey
        Well, I guess the callback has no arguments, so `this.setState({myState: foo}, () => {state is updated here})`
      • 2020-04-28 11900, 2020

      • alastairp
        cool
      • 2020-04-28 11914, 2020

      • alastairp
        and in the callback I can call another function, this.blah() ?
      • 2020-04-28 11927, 2020

      • Mr_Monkey
        Yes. but don't call setState in it ;)
      • 2020-04-28 11931, 2020

      • alastairp
        see how in my addMbid function, I call setState again. is this allowed?
      • 2020-04-28 11936, 2020

      • alastairp
        grrr
      • 2020-04-28 11938, 2020

      • Mr_Monkey
        Negative :)
      • 2020-04-28 11948, 2020

      • Mr_Monkey
        So ComponentDidUpdate to the rescue
      • 2020-04-28 11953, 2020

      • Mr_Monkey
        > The second parameter to setState() is an optional callback function that will be executed once setState is completed and the component is re-rendered. Generally we recommend using componentDidUpdate() for such logic instead.
      • 2020-04-28 11904, 2020

      • Mr_Monkey
      • 2020-04-28 11917, 2020

      • alastairp
        I'll read into that, thank you!
      • 2020-04-28 11924, 2020

      • Mr_Monkey
        >You may call setState() immediately in componentDidUpdate() but note that it must be wrapped in a condition like in the example above, or you’ll cause an infinite loop.
      • 2020-04-28 11904, 2020

      • Mr_Monkey
        Basically, you check if the state has changed before calling setState again
      • 2020-04-28 11908, 2020

      • alastairp
        is there a shorthand for `function = () => { }` ?
      • 2020-04-28 11956, 2020

      • Mr_Monkey
        I guess arrow functions *are* the shorthand
      • 2020-04-28 11904, 2020

      • Mr_Monkey
        Unless I misunderstood the question
      • 2020-04-28 11908, 2020

      • alastairp
        mm
      • 2020-04-28 11929, 2020

      • alastairp
        I seem to recall seeing something like `function() => { }` maybe? for functions without any arguments
      • 2020-04-28 11946, 2020

      • Mr_Monkey
        `() => {}`
      • 2020-04-28 11902, 2020

      • Mr_Monkey
        drop the `function`
      • 2020-04-28 11916, 2020

      • alastairp
        sorry, `function` in this case was the name of a function, not the keyword
      • 2020-04-28 11948, 2020

      • alastairp
        OK, in the case that it's anonymous, you would do `foo('bar', () => {...} )` ?
      • 2020-04-28 11950, 2020

      • shivam-kapila
        Mr_Monkey: Doesnt the`function = () => { }` looks like arrow fxn with assignment?
      • 2020-04-28 11903, 2020

      • alastairp
        and named, it's `x = () => {...}` to make a function called x
      • 2020-04-28 11903, 2020

      • Mr_Monkey
        Both of thise things :D ^
      • 2020-04-28 11908, 2020

      • Mr_Monkey
        Exactly
      • 2020-04-28 11915, 2020

      • alastairp
        and if there are args, you put the args in ()
      • 2020-04-28 11921, 2020

      • Mr_Monkey
        correct
      • 2020-04-28 11925, 2020

      • alastairp
        thank you!
      • 2020-04-28 11904, 2020

      • Mr_Monkey
        Also, if you have a single argument, no need for parentheses: `foo('bar', fnord => {//do something with fnord} )`
      • 2020-04-28 11914, 2020

      • shivam-kapila
        I like arrow fxns. They have other advantages too.
      • 2020-04-28 11936, 2020

      • Mr_Monkey
        Mostly inherited scope, right?
      • 2020-04-28 11954, 2020

      • Mr_Monkey
        Double-edged sword, that one
      • 2020-04-28 11916, 2020

      • shivam-kapila
        yesss
      • 2020-04-28 11920, 2020

      • shivam-kapila
        `this` made esy
      • 2020-04-28 11923, 2020

      • shivam-kapila
        easy*
      • 2020-04-28 11912, 2020

      • BrainzGit
        [musicbrainz-docker] corny opened pull request #138 (master…update-jetty): Update jetty container https://github.com/metabrainz/musicbrainz-docker/…
      • 2020-04-28 11929, 2020

      • BrainzGit
        [musicbrainz-docker] corny opened pull request #139 (master…simplify-dockerfile): Simplify Dockerfile https://github.com/metabrainz/musicbrainz-docker/…
      • 2020-04-28 11914, 2020

      • ruaok
        I'm tickled pink by how much people are embracing musicbrainz-docker.
      • 2020-04-28 11916, 2020

      • ruaok
        !m yvanzo
      • 2020-04-28 11917, 2020

      • BrainzBot
        You're doing good work, yvanzo!
      • 2020-04-28 11944, 2020

      • rohitdandamudi joined the channel
      • 2020-04-28 11933, 2020

      • BrainzGit
        [musicbrainz-server] reosarevok opened pull request #1482 (master…MBS-10792): MBS-10792: Convert historic Change Artist Quality edit to React https://github.com/metabrainz/musicbrainz-server/…
      • 2020-04-28 11935, 2020

      • BrainzBot
        MBS-10792: Convert historic Change Artist Quality edit to React https://tickets.metabrainz.org/browse/MBS-10792
      • 2020-04-28 11915, 2020

      • alastairp
        lotsa react going on
      • 2020-04-28 11946, 2020

      • reosarevok
        Lots of small files need converting :p
      • 2020-04-28 11958, 2020

      • reosarevok
        (but it's probably easier to review them in small amounts)
      • 2020-04-28 11903, 2020

      • BrainzGit
        [metabrainz.org] mayhem opened pull request #343 (master…current-pledges): Add current supporters page https://github.com/metabrainz/metabrainz.org/pull…