Skip to content
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

React UI: Starting Screen Progress Bar Should Start at 0 #8908

Merged
merged 3 commits into from
Jun 9, 2021

Conversation

LeviHarrison
Copy link
Member

Not all WAL replays start at segment 0, so we must set the progress bar's zero value to the start point. As it turns out, the min prop of Bootstrap's progress bar doesn't seem to do anything, so this PR implements an alternative way of setting a minimum.

Fixes #8903

Signed-off-by: Levi Harrison <git@leviharrison.dev>
Signed-off-by: Levi Harrison <git@leviharrison.dev>
@juliusv
Copy link
Member

juliusv commented Jun 9, 2021

From glancing at https://github.com/reactstrap/reactstrap/blob/master/src/Progress.js, it does use the min value, but only for ARIA attributes. So we probably still want to set it, even though it has no visual influence.

Btw. react-bootstrap also seems to take it into account properly for the displayed width (https://github.com/react-bootstrap/react-bootstrap/blob/c03150e24846d9df32bad7d0757a8be5848babbc/src/ProgressBar.tsx#L137), but we're using reacstrap in Prometheus (and not saying we should change that now :)).

@juliusv
Copy link
Member

juliusv commented Jun 9, 2021

Other than that, 👍

Signed-off-by: Levi Harrison <git@leviharrison.dev>
@juliusv juliusv merged commit d44b4c5 into prometheus:main Jun 9, 2021
@juliusv
Copy link
Member

juliusv commented Jun 9, 2021

Thanks!

@LeviHarrison LeviHarrison deleted the fix-progress-bar branch June 9, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starting screen progressbar should start at 0
2 participants