Skip to content

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

Merged
JamesNK merged 4 commits intomicrosoft:mainfrom
adamint:dev/adamint/7137-timestamp-setting-split-off
Jan 28, 2025
Merged

Split off "hide timestamp" setting from rest of console log state#7220
JamesNK merged 4 commits intomicrosoft:mainfrom
adamint:dev/adamint/7137-timestamp-setting-split-off

Conversation

@adamint
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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);

Comment thread src/Aspire.Dashboard/Utils/BrowserStorageKeys.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs Outdated
Comment thread src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs Outdated
await this.AfterViewModelChangedAsync(_contentLayout, waitToApplyMobileChange: false);
await SessionStorage.SetAsync(HideTimestampStorageKey, new ConsoleLogTimestampState(HideTimestamp: hideTimestamp));
_hideTimestamp = hideTimestamp;
StateHasChanged();
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/Aspire.Dashboard/Components/Pages/ConsoleLogs.razor.cs Outdated
@adamint adamint requested a review from JamesNK January 27, 2025 23:05
@JamesNK JamesNK merged commit b7376f9 into microsoft:main Jan 28, 2025
@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?

3 participants