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

Split off "hide timestamp" setting from rest of console log state #7220

Merged

Conversation

adamint
Copy link
Member

@adamint adamint commented Jan 23, 2025

Description

This also removes it from the query string.

Fixes #7137

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs:315

  • Ensure that all references to the renamed method ToggleTimestampAsync are updated accordingly.
private async Task ToggleTimestampAsync(bool hideTimestamp)

src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs:548

  • Add tests to cover the new ConsoleLogTimestampState class to ensure it works as expected.
public record ConsoleLogTimestampState(bool HideTimestamp);

await this.AfterViewModelChangedAsync(_contentLayout, waitToApplyMobileChange: false);
await SessionStorage.SetAsync(HideTimestampStorageKey, new ConsoleLogTimestampState(HideTimestamp: hideTimestamp));
_hideTimestamp = hideTimestamp;
StateHasChanged();
Copy link
Member

Choose a reason for hiding this comment

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

Is this nessessary? I would have thought that it would be triggered automatically after the click event

Copy link
Member Author

Choose a reason for hiding this comment

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

Surprisingly yes, it is necessary. without:
Animation

@adamint adamint requested a review from JamesNK January 27, 2025 23:05
@JamesNK JamesNK merged commit b7376f9 into dotnet:main Jan 28, 2025
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AzureTools][Aspire][Question] Should the "Hide Timestamp" setting also apply to "Console Logs" in Resources?
2 participants