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

Logs navigation: derive current page index #80167

Merged
merged 3 commits into from
Jan 9, 2024
Merged

Conversation

matyax
Copy link
Contributor

@matyax matyax commented Jan 8, 2024

Before these changes, we were using a state variable to hold the current displayed page index, which needed to be updated after a change in any of multiple props and internal state. This approach caused running conditions, depending on the current value of the list of pages, but also was not necessary, as it can be easily calculated at render time, instead of requiring async state updates.

Which issue(s) does this PR fix?:

Escalation 8919.

Special notes for your reviewer:

Please check that the navigation pages are correctly generated, and the current active page is highlighted in the list of pages.

@matyax matyax requested a review from a team as a code owner January 8, 2024 18:24
@matyax matyax self-assigned this Jan 8, 2024
@matyax matyax added the no-changelog Skip including change in changelog/release notes label Jan 8, 2024
@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.3.x milestone Jan 8, 2024
@matyax matyax added the no-backport Skip backport of PR label Jan 8, 2024
@matyax matyax enabled auto-merge (squash) January 8, 2024 18:31
Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but it.only needs to be removed.

public/app/features/explore/Logs/LogsNavigation.test.tsx Outdated Show resolved Hide resolved
@matyax matyax merged commit fb34916 into main Jan 9, 2024
14 checks passed
@matyax matyax deleted the matyax/broken-active-page branch January 9, 2024 09:49
@ifrost ifrost modified the milestones: 10.3.x, 10.4.x Jan 12, 2024
zserge pushed a commit that referenced this pull request Jan 22, 2024
* Logs navigation: derive current page index

* Formatting
s0lesurviv0r pushed a commit to s0lesurviv0r/grafana that referenced this pull request Feb 3, 2024
* Logs navigation: derive current page index

* Formatting
@aangelisc aangelisc modified the milestones: 10.4.x, 10.4.0 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/explore area/frontend no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants