middlewarehq / middleware

✨ Open-source DORA metrics platform for engineering teams ✨
https://middlewarehq.com
Apache License 2.0
1.05k stars 64 forks source link

fix: fixed branch selector #415

Closed ayush3160 closed 3 months ago

ayush3160 commented 3 months ago

Branch names now are rendering as removable-chips after reloading page.

Linked Issue(s)

fixes #331

Proposed changes (including videos or screenshots)

https://github.com/middlewarehq/middleware/assets/89914602/2e532a78-33f4-4e84-a49a-6337023a1a48

jayantbh commented 3 months ago

Thanks for both of your PRs, @ayush3160 Someone from the team will check it out asap.

e-for-eshaan commented 3 months ago

Hey @ayush3160 . Thanks for the contribution!

Pulled your PR for testing, this behaviour seems incorrect. Custom branch names should render only if custom branches are selected, other wise the prod branches and all branches selectors shall remain highlighted.

image

Here, no custom branches were selected, yet the input is filled. This can be fixed by checking if prod-branches or all-branches are selected. if yes, then the state for the input must be empty.

feel free to ask more questions, we'll be glad to help!

ayush3160 commented 3 months ago

Hi @e-for-eshaan , Thanks for reviewing I missed the case of prod and all branches mode but I have fixed it in above commit please have a look and let me know if any other changes are needed.

e-for-eshaan commented 3 months ago

Hey @ayush3160 ! Sorry for the late response, but your PR looks promising, just tested it locally. Mentioned a minor change, can be merged right after this!

ayush3160 commented 3 months ago

Thanks for reviewing @e-for-eshaan , I have done the changes please check once.