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

Fix flaky "New Card Pinned" behavior. #6708

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

bmd3k
Copy link
Contributor

@bmd3k bmd3k commented Dec 21, 2023

We noticed that the behavior for showing the "New Card Pinned" notice is flaky. It sometimes does not trigger for the first pinned card after page load.

We just simplify the logic by tracking the "lastPinnedCardTime" in ngrx state and deriving the "New Pinned Card" notice from that state.

@bmd3k bmd3k changed the title Fix flaky "New Pinned Card" behavior. Fix flaky "New Card Pinned" behavior. Dec 21, 2023
@bmd3k bmd3k requested a review from rileyajones December 21, 2023 12:30
Copy link
Contributor

@rileyajones rileyajones left a comment

Choose a reason for hiding this comment

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

This is great, thank you for making this so much simpler.

@@ -51,5 +51,5 @@ import {CardIdWithMetadata} from '../metrics_view_types';
export class PinnedViewComponent {
@Input() cardObserver!: CardObserver;
@Input() cardIdsWithMetadata!: CardIdWithMetadata[];
@Input() newCardPinnedIds!: [number];
@Input() lastPinnedCardTime!: [number];
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this still need to be a [number]? It seems simpler to be number

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@bmd3k bmd3k merged commit 082560b into tensorflow:master Dec 21, 2023
13 checks passed
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.

2 participants