bugbug icon indicating copy to clipboard operation
bugbug copied to clipboard

Update the components select when a product is selected

Open marco-c opened this issue 4 years ago • 11 comments

Just like we do when a team is selected.

marco-c avatar Mar 17 '21 18:03 marco-c

Hello @marco-c I would like to work on this issue

Ayushsunny avatar Mar 19 '21 15:03 Ayushsunny

Hello @Ayushsunny, this will need to be implemented in ui/changes/src/common.js. You can run the ui project by doing: cd ui/changes and then npm run dev.

You will need to update async function buildComponentsSelect(teams = null) { by adding a product argument, and using it like the teams argument to filter the bug summaries. Next, you will need to something like https://github.com/mozilla/bugbug/blob/7077c0c3b0310f8c1a25ea9ff144f53e80595a32/ui/changes/src/common.js#L1722-L1725, in the buildProductsSelect function.

marco-c avatar Mar 19 '21 15:03 marco-c

Hello @Ayushsunny, this will need to be implemented in ui/changes/src/common.js. You can run the ui project by doing: cd ui/changes and then npm run dev.

You will need to update async function buildComponentsSelect(teams = null) { by adding a product argument, and using it like the teams component to filter the bug summaries. Next, you will need to something like

https://github.com/mozilla/bugbug/blob/7077c0c3b0310f8c1a25ea9ff144f53e80595a32/ui/changes/src/common.js#L1722-L1725 , in the buildProductsSelect function.

Hello @marco-c I'm getting this error while running this project by "npm run dev" on my terminal

Screenshot from 2021-03-20 01-05-45

Ayushsunny avatar Mar 19 '21 19:03 Ayushsunny

Did you run npm install first?

marco-c avatar Mar 22 '21 10:03 marco-c

Did you run npm install first?

Yes sir.

Ayushsunny avatar Mar 22 '21 10:03 Ayushsunny

@Ayushsunny, the error messages says "node_modules" doesn't exist, so it seems you didn't run npm install.

marco-c avatar Mar 22 '21 10:03 marco-c

@Ayushsunny, the error messages says "node_modules" doesn't exist, so it seems you didn't run npm install.

Thank you so much, It's working

Ayushsunny avatar Mar 22 '21 16:03 Ayushsunny

@marco-c Sir can you please review my code that I'm going right or not? Screenshot from 2021-03-22 22-11-53

Ayushsunny avatar Mar 22 '21 16:03 Ayushsunny

In general, please don't share screenshot, please share code instead!

sylvestre avatar Mar 22 '21 16:03 sylvestre

Sorry @sylvestre sir I'm new to open source I didn't know that, here is the code that i've added :

 options["products"].callback = async function () { 
    await buildProductsSelect(new Set(getOption("products"))); 
    return "components"; 
  }; ```

Ayushsunny avatar Mar 22 '21 16:03 Ayushsunny

@Ayushsunny you can submit a PR with your code changes, so it can be reviewed

marco-c avatar Mar 22 '21 17:03 marco-c