#bookbrainz

/

      • MRiddickW joined the channel
      • 2022-08-08 22028, 2022

      • ansh
        monkey: Thanks for reviewing my PR :)
      • 2022-08-08 22039, 2022

      • ansh
        Regarding https://github.com/metabrainz/bookbrainz-site/pul…, I think I can't use it here unless there is a way to update the alert message directly from the external service page. This is because when a user disconnects CB, the state of alert is updated without refreshing the page.
      • 2022-08-08 22042, 2022

      • monkey
        Hm, I see. Let me think about this for a minute
      • 2022-08-08 22041, 2022

      • MRiddickW has quit
      • 2022-08-08 22022, 2022

      • monkey
        I think this is a problem best solve with a React context, but that would need to be for another PR
      • 2022-08-08 22044, 2022

      • monkey
        I'd say maybe use the existing system for any alert that is created on the server route, and use your alert setup for the dynamic alerts
      • 2022-08-08 22004, 2022

      • monkey
        (that way once we get to refactoring them we should only have to refactor the dynamic alerts)
      • 2022-08-08 22035, 2022

      • monkey
        ansh: Also I missed this: you should be using the component's state for this: https://github.com/metabrainz/bookbrainz-site/pul…
      • 2022-08-08 22008, 2022

      • monkey
        Bah, I'll comment on the PR directly :)
      • 2022-08-08 22052, 2022

      • ansh
        monkey: I tried using both the alert systems together, but once I have pushed an alert from the server, I can't remove it without refreshing the page
      • 2022-08-08 22018, 2022

      • ansh
      • 2022-08-08 22007, 2022

      • monkey
        Hmm, I see. Well, let's leave it for now then, and plan to refactor the alerts in another PR to use a context
      • 2022-08-08 22002, 2022

      • ansh
        Okay
      • 2022-08-08 22006, 2022

      • ansh
        Also for this https://github.com/metabrainz/bookbrainz-site/pul…. What should I debounce, updating the state `textContent` or `reviewValidateAlert` or both?
      • 2022-08-08 22050, 2022

      • monkey
        It's `handleTextInputChange` itself that you'll want a debounced version of
      • 2022-08-08 22022, 2022

      • monkey
        i.e. create a `debouncedHandleTextInputChange` and use that as the handler
      • 2022-08-08 22056, 2022

      • ansh
        But the state textContent should be updated immediately otherwise the user won't see what he types
      • 2022-08-08 22051, 2022

      • ansh
        For example the case you mentioned there, we are updating the text state immediately but delaying the search trigger
      • 2022-08-08 22019, 2022

      • monkey
        Are you certain the textarea does not update as the user types, regardless of react state? If indeed it does seem slow then as you say we should update the state value and debounce other operations
      • 2022-08-08 22031, 2022

      • ansh
        The value of the text area is being given by the states. https://github.com/anshg1214/bookbrainz-site/blob…
      • 2022-08-08 22047, 2022

      • ansh
        I tried to delay the state updation by using setTimeout, and then I can notice that typing is slow.
      • 2022-08-08 22036, 2022

      • monkey
        OK, then that confirms it, thanks for checking
      • 2022-08-08 22058, 2022

      • monkey
        So update the state normally but debounce other operations
      • 2022-08-08 22015, 2022

      • Shubh
        monkey: whenever you get time, please review the frontend PR.
      • 2022-08-08 22025, 2022

      • Shubh
        I know it's going to be ton of work to review that PR so please let me know if there's anything i can do to help.
      • 2022-08-08 22037, 2022

      • monkey
        OK, ready to review, exciting ! :)
      • 2022-08-08 22041, 2022

      • monkey
        Definitely a lot of changes to review, but a lot of them are fairly simple.
      • 2022-08-08 22000, 2022

      • monkey
        And I've been reading the PR as you went, so I'm not expecting a lot of surprises
      • 2022-08-08 22030, 2022

      • ansh
        monkey: other than updating the state, I am just using text to process one specific error that too inside `handleTextInputChange`, So I don't think i need to debounce anything.
      • 2022-08-08 22032, 2022

      • ansh
      • 2022-08-08 22038, 2022

      • monkey
        I was also thinking of this text processing, but perhaps you're right and debouncing is excessive: https://github.com/metabrainz/bookbrainz-site/blo… you want to be sure, you can try throttling your CPU in devtools > performance tab and see if there is any noticeable slowdown:
      • 2022-08-08 22038, 2022

      • monkey
      • 2022-08-08 22047, 2022

      • ansh
        This is interesting
      • 2022-08-08 22028, 2022

      • ansh
        Also should we display the total count of the average ratings?
      • 2022-08-08 22009, 2022

      • monkey
        Yes, I think that's definitely a plus. I personally always want to know how many people voted, it's an indicator of confidence in the rating
      • 2022-08-08 22030, 2022

      • monkey
        Granted we're not amazon, but…
      • 2022-08-08 22042, 2022

      • ansh
        Agreed
      • 2022-08-08 22013, 2022

      • ansh
        I'll open a PR for CB
      • 2022-08-08 22050, 2022

      • monkey
        Oh, I thought that was already available in CB API. Well, thanks then :) I think it'll be a useful feature.
      • 2022-08-08 22017, 2022

      • ansh
        monkey: Apart from these two, should I add the link for external service page anywhere else? https://usercontent.irccloud-cdn.com/file/J516Ero…
      • 2022-08-08 22043, 2022

      • monkey
        No, I think that's all that's needed !
      • 2022-08-08 22024, 2022

      • ansh
        Should I add it in this PR only?
      • 2022-08-08 22045, 2022

      • monkey
        Yes, do add it to your ongoing PR
      • 2022-08-08 22002, 2022

      • ansh
        👍
      • 2022-08-08 22022, 2022

      • CatQuest
        hi, sorry for being afk and promising ot test and not testing. pls ping me about these this week
      • 2022-08-08 22030, 2022

      • CatQuest
        (ping KassOtsimine especially)
      • 2022-08-08 22019, 2022

      • Shubh
        CatQuest: sure thing!, thanks for all the efforts. really appreciated :)
      • 2022-08-08 22028, 2022

      • CatQuest
        :D
      • 2022-08-08 22050, 2022

      • monkey
        What he said ^ :p
      • 2022-08-08 22059, 2022

      • monkey
        No expectations, no stress !
      • 2022-08-08 22019, 2022

      • CatQuest
        i'd liek to test it so it works instead of vaking up t oa rude awakening and nothing does and i can't use bb :O
      • 2022-08-08 22026, 2022

      • CatQuest
        yay I did actually manage to add https://test.bookbrainz.org/edition/25bd70ed-6c5a… (but this time i added no works)
      • 2022-08-08 22037, 2022

      • CatQuest
        still it's bad that the author credit is mandatory
      • 2022-08-08 22036, 2022

      • MRiddickW joined the channel
      • 2022-08-08 22040, 2022

      • reosarevok_ joined the channel
      • 2022-08-08 22008, 2022

      • reosarevok has quit
      • 2022-08-08 22008, 2022

      • reosarevok_ is now known as reosarevok
      • 2022-08-08 22014, 2022

      • MRiddickW has quit
      • 2022-08-08 22002, 2022

      • MRiddickW joined the channel