Skip to content

Razor formatting breaks C# code #11846

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

Open
Laptop765 opened this issue May 9, 2025 · 2 comments
Open

Razor formatting breaks C# code #11846

Laptop765 opened this issue May 9, 2025 · 2 comments

Comments

@Laptop765
Copy link

Is this a Bug or Feature request?:

Bug

Steps to reproduce:

------------------- Please fill in this section -------------------------
Format the following code with aspnetcorerazor formatter and multiple lines will be partially pulled out of comments causing various errors. In particular the IsSpotifyAuthenticated definition.

@page "/shuffle"
@inject NavigationManager NavigationManager // For potential future redirects
@* @inject SpotifyPlaylistShuffler PlaylistShuffler // We'll uncomment this later
@inject IHttpContextAccessor HttpContextAccessor // To check for auth *@

<h3>Shuffle Spotify Playlist</h3>

@* We'll add a check here later to only show this if the user is authenticated *@
@* @if (IsSpotifyAuthenticated) *@
@* { *@
    <div class="mb-3">
        <label for="playlistUrlOrId" class="form-label">Spotify Playlist URL or ID:</label>
        <input type="text" class="form-control" id="playlistUrlOrId" @bind="PlaylistUrlOrId" placeholder="Enter Spotify Playlist URL or ID" />
    </div>

    <button class="btn btn-primary" @onclick="HandleShufflePlaylist" disabled="@IsShuffling">
        @if (IsShuffling)
        {
            <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
            <span> Shuffling...</span>
        }
        else
        {
            <span>Shuffle Playlist</span>
        }
    </button>

    @if (!string.IsNullOrEmpty(StatusMessage))
    {
        <div class="mt-3 alert @(IsError ? "alert-danger" : "alert-success")" role="alert">
            @StatusMessage
            @if (!string.IsNullOrEmpty(NewPlaylistLink))
            {
                <p>View your new playlist: <a href="@NewPlaylistLink" target="_blank">@NewPlaylistLink</a></p>
            }
        </div>
    }
@* } *@
@* else *@
@* { *@
@* <p>Please <a href="/">log in with Spotify</a> first to use this feature.</p> *@
@* } *@


@code {
    private string? PlaylistUrlOrId { get; set; }
    private bool IsShuffling { get; set; } = false;
    private string? StatusMessage { get; set; }
    private bool IsError { get; set; } = false;
    private string? NewPlaylistLink { get; set; } // To store the link to the new playlist

    // private bool IsSpotifyAuthenticated => !string.IsNullOrEmpty(HttpContextAccessor.HttpContext?.Session?.GetString("Spotify_AccessToken"));

    private async Task HandleShufflePlaylist()
    {
        IsShuffling = true;
        StatusMessage = "Starting shuffle process...";
        IsError = false;
        NewPlaylistLink = null;
        StateHasChanged(); // Update UI to show spinner

        if (string.IsNullOrWhiteSpace(PlaylistUrlOrId))
        {
            StatusMessage = "Playlist URL or ID cannot be empty.";
            IsError = true;
            IsShuffling = false;
            return;
        }

        // Dummy delay to simulate work - replace with actual service call
        await Task.Delay(2000);

        // --- This is where we will call the service ---
        // try
        // {
        //     (bool success, string message, string? newPlaylistUrl) = await PlaylistShuffler.ShufflePlaylistAsync(PlaylistUrlOrId, CancellationToken.None);
        //     StatusMessage = message;
        //     IsError = !success;
        //     NewPlaylistLink = newPlaylistUrl;
        // }
        // catch (Exception ex)
        // {
        //     StatusMessage = $"An unexpected error occurred: {ex.Message}";
        //     IsError = true;
        // }
        // finally
        // {
        //     IsShuffling = false;
        // }

        // --- Placeholder for now ---
        StatusMessage = "Shuffle process would happen here. Service call is commented out.";
        // IsError = false; // Or true if simulating an error
        // NewPlaylistLink = "https://open.spotify.com/playlist/yourNewPlaylistID"; // Simulate link
        IsShuffling = false;
        // --- End Placeholder ---

        StateHasChanged(); // Update UI with result
    }
}

Description of the problem:

------------------- Please fill in this section -------------------------

Expected behavior: Don't break the syntax of the code.

Actual behavior: Formatter breaks the code so it no longer compiles.

Screen recording from just hitting save:

Screen.Recording.2025-05-08.at.6.45.37.PM.mov

Logs

OmniSharp

------------------- Please fill in this section -------------------------
To find the OmniSharp log, open VS Code's "Output" pane, then in the dropdown choose "OmniSharp Log".

There is no OmniSharp log.

Razor

Expand

-- Starting Issue Data Collection-- 
1101 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '51'.'
1101 - Projected document in sync with host document
1101 - Projected text document in sync with data type
1101 - Synchronization successful!
1102 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '51'.'
1102 - Projected document in sync with host document
1102 - Projected text document in sync with data type
1102 - Synchronization successful!
1103 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '51'.'
1103 - Projected document in sync with host document
1103 - Projected text document in sync with data type
1103 - Synchronization successful!
1104 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '51'.'
1104 - Projected document in sync with host document
1104 - Projected text document in sync with data type
1104 - Synchronization successful!
1105 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '51'.'
1105 - Projected document in sync with host document
1105 - Projected text document in sync with data type
1105 - Synchronization successful!
1106 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '51'.'
1106 - Projected document in sync with host document
1106 - Projected text document in sync with data type
1106 - Synchronization successful!
1107 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '51'.'
1107 - Projected document in sync with host document
1107 - Projected text document in sync with data type
1107 - Synchronization successful!
1108 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '51'.'
1108 - Projected document in sync with host document
1108 - Projected text document in sync with data type
1108 - Synchronization successful!
1109 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.html':
    Currently at 51, synchronizing to version '51'.'
1109 - Projected document in sync with host document
1109 - Projected text document in sync with data type
1109 - Synchronization successful!
1110 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 51, synchronizing to version '52'.'
1110 - Projected document not in sync with host document, waiting for update...
    Current host document sync version: 51
Updating the HTML document for Razor file '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor' (52)
Notifying document '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor' changed 'htmlChanged' with '9' changes.
Updating the C# document for Razor file '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor' (52)
Notifying document '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor' changed 'csharpChanged' with '21' changes.
1110 - Projected document in sync with host document
1110 - Projected text document not in sync with data type, waiting for update...
    Current projected text document sync version: 51
1111 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1111 - Projected document in sync with host document
1111 - Projected text document not in sync with data type, waiting for update...
    Current projected text document sync version: 51
1110 - Projected text document synchronized to 52.
1111 - Projected text document synchronized to 52.
1110 - Projected text document in sync with data type
1110 - Synchronization successful!
1111 - Projected text document in sync with data type
1111 - Synchronization successful!
1112 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1112 - Projected document in sync with host document
1112 - Projected text document in sync with data type
1112 - Synchronization successful!
1113 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1113 - Projected document in sync with host document
1113 - Projected text document in sync with data type
1113 - Synchronization successful!
1114 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1114 - Projected document in sync with host document
1114 - Projected text document in sync with data type
1114 - Synchronization successful!
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[111, 46], [111, 67]].
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[153, 39], [153, 54]].
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[128, 31], [128, 44]].
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[214, 23], [214, 44]].
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[163, 53], [163, 68]].
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[146, 13], [146, 26]].
Re-mapping location [[138, 33], [138, 40]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[30, 33], [30, 40]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[171, 87], [171, 102]].
Re-mapping location [[208, 20], [208, 33]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[48, 20], [48, 33]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Re-mapping location [[209, 17], [209, 24]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[49, 17], [49, 24]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Re-mapping location [[217, 8], [217, 21]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[57, 8], [57, 21]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Re-mapping location [[210, 20], [210, 35]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[50, 20], [50, 35]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Re-mapping location [[218, 8], [218, 15]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[58, 8], [58, 15]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[224, 12], [224, 25]].
Re-mapping location [[225, 12], [225, 19]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[65, 12], [65, 19]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Re-mapping location [[219, 8], [219, 23]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[59, 8], [59, 23]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Unable to remap file /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs at [[252, 8], [252, 21]].
1115 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1115 - Projected document in sync with host document
1115 - Projected text document in sync with data type
1115 - Synchronization successful!
1116 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1116 - Projected document in sync with host document
1116 - Projected text document in sync with data type
1116 - Synchronization successful!
1117 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1117 - Projected document in sync with host document
1117 - Projected text document in sync with data type
1117 - Synchronization successful!
1118 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1118 - Projected document in sync with host document
1118 - Projected text document in sync with data type
1118 - Synchronization successful!
1119 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1119 - Projected document in sync with host document
1119 - Projected text document in sync with data type
1119 - Synchronization successful!
1120 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1120 - Projected document in sync with host document
1120 - Projected text document in sync with data type
1120 - Synchronization successful!
1121 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.html':
    Currently at 52, synchronizing to version '52'.'
1121 - Projected document in sync with host document
1121 - Projected text document in sync with data type
1121 - Synchronization successful!
1122 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1122 - Projected document in sync with host document
1122 - Projected text document in sync with data type
1122 - Synchronization successful!
1123 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1123 - Projected document in sync with host document
1123 - Projected text document in sync with data type
1123 - Synchronization successful!
1124 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1124 - Projected document in sync with host document
1124 - Projected text document in sync with data type
1124 - Synchronization successful!
Re-mapping location [[111, 42], [111, 63]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[16, 42], [16, 63]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Re-mapping location [[215, 19], [215, 40]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[55, 19], [55, 40]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
Re-mapping location [[213, 8], [213, 21]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs to [[53, 8], [53, 21]] in /Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor
1125 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1125 - Projected document in sync with host document
1125 - Projected text document in sync with data type
1125 - Synchronization successful!
1126 - Synchronizing '/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor__virtual.cs':
    Currently at 52, synchronizing to version '52'.'
1126 - Projected document in sync with host document
1126 - Projected text document in sync with data type
1126 - Synchronization successful!
-- Stopping Issue Data Collection-- 

Workspace information

Razor document:

Expand

@page "/shuffle"
@inject NavigationManager NavigationManager // For potential future redirects
@* @inject SpotifyPlaylistShuffler PlaylistShuffler // We'll uncomment this later
@inject IHttpContextAccessor HttpContextAccessor // To check for auth *@

<h3>Shuffle Spotify Playlist</h3>

@* We'll add a check here later to only show this if the user is authenticated *@
@* @if (IsSpotifyAuthenticated) *@
@* { *@
<div class="mb-3">
    <label for="playlistUrlOrId" class="form-label">Spotify Playlist URL or ID:</label>
    <input type="text" class="form-control" id="playlistUrlOrId" @bind="PlaylistUrlOrId"
        placeholder="Enter Spotify Playlist URL or ID" />
</div>

<button class="btn btn-primary" @onclick="HandleShufflePlaylist" disabled="@IsShuffling">
    @if (IsShuffling)
    {
        <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
        <span> Shuffling...</span>
    }
    else
    {
        <span>Shuffle Playlist</span>
    }
</button>

@if (!string.IsNullOrEmpty(StatusMessage))
{
    <div class="mt-3 alert @(IsError ? "alert-danger" : "alert-success")" role="alert">
        @StatusMessage
        @if (!string.IsNullOrEmpty(NewPlaylistLink))
        {
            <p>View your new playlist: <a href="@NewPlaylistLink" target="_blank">@NewPlaylistLink</a></p>
        }
    </div>
}
@* } *@
@* else *@
@* { *@
@* <p>Please <a href="/">log in with Spotify</a> first to use this feature.</p> *@
@* } *@


@code {
    private string? PlaylistUrlOrId { get; set; }
    private bool IsShuffling { get; set; } = false;
    private string? StatusMessage { get; set; }
    private bool IsError { get; set; } = false;
    private string? NewPlaylistLink { get; set; } // To store the link to the new playlist

// private bool IsSpotifyAuthenticated =>
!string.IsNullOrEmpty(HttpContextAccessor.HttpContext?.Session?.GetString("Spotify_AccessToken"));

private async Task HandleShufflePlaylist()
    {
        IsShuffling = true;
        StatusMessage = "Starting shuffle process...";
        IsError = false;
        NewPlaylistLink = null;
        StateHasChanged(); // Update UI to show spinner

        if (string.IsNullOrWhiteSpace(PlaylistUrlOrId))
        {
            StatusMessage = "Playlist URL or ID cannot be empty.";
            IsError = true;
            IsShuffling = false;
            return;
        }

        // Dummy delay to simulate work - replace with actual service call
        await Task.Delay(2000);

        // --- This is where we will call the service ---
        // try
        // {
        // (bool success, string message, string? newPlaylistUrl) = await PlaylistShuffler.ShufflePlaylistAsync(PlaylistUrlOrId,
        CancellationToken.None);
        // StatusMessage = message;
        // IsError = !success;
        // NewPlaylistLink = newPlaylistUrl;
        // }
        // catch (Exception ex)
        // {
        // StatusMessage = $"An unexpected error occurred: {ex.Message}";
        // IsError = true;
        // }
        // finally
        // {
        // IsShuffling = false;
        // }

        // --- Placeholder for now ---
        StatusMessage = "Shuffle process would happen here. Service call is commented out.";
        // IsError = false; // Or true if simulating an error
        // NewPlaylistLink = "https://open.spotify.com/playlist/yourNewPlaylistID"; // Simulate link
        IsShuffling = false;
        // --- End Placeholder ---

        StateHasChanged(); // Update UI with result
    }
}

Projected CSharp document:

Expand

////////////////////// Projected CSharp as seen by extension ///////////////////////
// <auto-generated/>
#pragma warning disable 1591
namespace UltimateJukebox.Shared.Components.Pages
{
    #line default
    using global::System;
    using global::System.Collections.Generic;
    using global::System.Linq;
    using global::System.Threading.Tasks;
    using global::Microsoft.AspNetCore.Components;
#nullable restore
#line 1 "_Imports.razor"
using Microsoft.AspNetCore.Components.Web;

#nullable disable
#nullable restore
#line 2 "_Imports.razor"
using Microsoft.Extensions.Configuration;

#line default
#line hidden
#nullable disable
    [global::Microsoft.AspNetCore.Components.RouteAttribute("/shuffle")]
    #nullable restore
    public partial class ShufflePlaylist : global::Microsoft.AspNetCore.Components.ComponentBase
    #nullable disable
    {
        #pragma warning disable 219
        private void __RazorDirectiveTokenHelpers__() {
        ((global::System.Action)(() => {
// language=Route,Component
#nullable restore
#line 1 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
global::System.Object __typeHelper = "/shuffle";

#line default
#line hidden
#nullable disable
        }
        ))();
        ((global::System.Action)(() => {
#nullable restore
#line 2 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
NavigationManager __typeHelper = default!;

#line default
#line hidden
#nullable disable
        }
        ))();
        ((global::System.Action)(() => {
#nullable restore
#line 2 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
global::System.Object NavigationManager = null!;

#line default
#line hidden
#nullable disable
        }
        ))();
        }
        #pragma warning restore 219
        #pragma warning disable 0414
        private static object __o = null;
        #pragma warning restore 0414
        #pragma warning disable 1998
        protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __o = global::Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line 13 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                                        PlaylistUrlOrId

#line default
#line hidden
#nullable disable
            );
            __o = global::Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => PlaylistUrlOrId = __value, PlaylistUrlOrId);
#nullable restore
#line 18 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
     if (IsShuffling)
    {
        

#line default
#line hidden
#nullable disable
                                                                                               
        
#nullable restore
#line 21 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                  
    }
    else
    {
        

#line default
#line hidden
#nullable disable
#nullable restore
#line 25 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                     
    }

#line default
#line hidden
#nullable disable
            __o = global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 17 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                          HandleShufflePlaylist

#line default
#line hidden
#nullable disable
            );
            __o = 
#nullable restore
#line 17 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                                            IsShuffling

#line default
#line hidden
#nullable disable
            ;
#nullable restore
#line 29 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
 if (!string.IsNullOrEmpty(StatusMessage))
{
    

#line default
#line hidden
#nullable disable
            __o = 
#nullable restore
#line 31 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                             IsError ? "alert-danger" : "alert-success"

#line default
#line hidden
#nullable disable
            ;
#nullable restore
#line 32 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
   __o = StatusMessage;

#line default
#line hidden
#nullable disable
#nullable restore
#line 33 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
         if (!string.IsNullOrEmpty(NewPlaylistLink))
        {
            

#line default
#line hidden
#nullable disable
            __o = 
#nullable restore
#line 35 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                 NewPlaylistLink

#line default
#line hidden
#nullable disable
            ;
#nullable restore
#line 35 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                                             __o = NewPlaylistLink;

#line default
#line hidden
#nullable disable
#nullable restore
#line 35 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                                                                          
        }

#line default
#line hidden
#nullable disable
#nullable restore
#line 37 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
          
}

#line default
#line hidden
#nullable disable
       

          

       

                                                                                  

       
        }
        #pragma warning restore 1998
#nullable restore
#line 46 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
       
    private string? PlaylistUrlOrId { get; set; }
    private bool IsShuffling { get; set; } = false;
    private string? StatusMessage { get; set; }
    private bool IsError { get; set; } = false;
    private string? NewPlaylistLink { get; set; } // To store the link to the new playlist

// private bool IsSpotifyAuthenticated =>
!string.IsNullOrEmpty(HttpContextAccessor.HttpContext?.Session?.GetString("Spotify_AccessToken"));

private async Task HandleShufflePlaylist()
    {
        IsShuffling = true;
        StatusMessage = "Starting shuffle process...";
        IsError = false;
        NewPlaylistLink = null;
        StateHasChanged(); // Update UI to show spinner

        if (string.IsNullOrWhiteSpace(PlaylistUrlOrId))
        {
            StatusMessage = "Playlist URL or ID cannot be empty.";
            IsError = true;
            IsShuffling = false;
            return;
        }

        // Dummy delay to simulate work - replace with actual service call
        await Task.Delay(2000);

        // --- This is where we will call the service ---
        // try
        // {
        // (bool success, string message, string? newPlaylistUrl) = await PlaylistShuffler.ShufflePlaylistAsync(PlaylistUrlOrId,
        CancellationToken.None);
        // StatusMessage = message;
        // IsError = !success;
        // NewPlaylistLink = newPlaylistUrl;
        // }
        // catch (Exception ex)
        // {
        // StatusMessage = $"An unexpected error occurred: {ex.Message}";
        // IsError = true;
        // }
        // finally
        // {
        // IsShuffling = false;
        // }

        // --- Placeholder for now ---
        StatusMessage = "Shuffle process would happen here. Service call is commented out.";
        // IsError = false; // Or true if simulating an error
        // NewPlaylistLink = "https://open.spotify.com/playlist/yourNewPlaylistID"; // Simulate link
        IsShuffling = false;
        // --- End Placeholder ---

        StateHasChanged(); // Update UI with result
    }

#line default
#line hidden
#nullable disable
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private NavigationManager NavigationManager { get; set; }
    }
}
#pragma warning restore 1591



////////////////////// Projected CSharp as seen by extension ///////////////////////
// <auto-generated/>
#pragma warning disable 1591
namespace UltimateJukebox.Shared.Components.Pages
{
    #line default
    using global::System;
    using global::System.Collections.Generic;
    using global::System.Linq;
    using global::System.Threading.Tasks;
    using global::Microsoft.AspNetCore.Components;
#nullable restore
#line 1 "_Imports.razor"
using Microsoft.AspNetCore.Components.Web;

#nullable disable
#nullable restore
#line 2 "_Imports.razor"
using Microsoft.Extensions.Configuration;

#line default
#line hidden
#nullable disable
    [global::Microsoft.AspNetCore.Components.RouteAttribute("/shuffle")]
    #nullable restore
    public partial class ShufflePlaylist : global::Microsoft.AspNetCore.Components.ComponentBase
    #nullable disable
    {
        #pragma warning disable 219
        private void __RazorDirectiveTokenHelpers__() {
        ((global::System.Action)(() => {
// language=Route,Component
#nullable restore
#line 1 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
global::System.Object __typeHelper = "/shuffle";

#line default
#line hidden
#nullable disable
        }
        ))();
        ((global::System.Action)(() => {
#nullable restore
#line 2 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
NavigationManager __typeHelper = default!;

#line default
#line hidden
#nullable disable
        }
        ))();
        ((global::System.Action)(() => {
#nullable restore
#line 2 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
global::System.Object NavigationManager = null!;

#line default
#line hidden
#nullable disable
        }
        ))();
        }
        #pragma warning restore 219
        #pragma warning disable 0414
        private static object __o = null;
        #pragma warning restore 0414
        #pragma warning disable 1998
        protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __o = global::Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line 13 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                                        PlaylistUrlOrId

#line default
#line hidden
#nullable disable
            );
            __o = global::Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => PlaylistUrlOrId = __value, PlaylistUrlOrId);
#nullable restore
#line 18 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
     if (IsShuffling)
    {
        

#line default
#line hidden
#nullable disable
                                                                                               
        
#nullable restore
#line 21 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                  
    }
    else
    {
        

#line default
#line hidden
#nullable disable
#nullable restore
#line 25 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                     
    }

#line default
#line hidden
#nullable disable
            __o = global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 17 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                          HandleShufflePlaylist

#line default
#line hidden
#nullable disable
            );
            __o = 
#nullable restore
#line 17 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                                            IsShuffling

#line default
#line hidden
#nullable disable
            ;
#nullable restore
#line 29 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
 if (!string.IsNullOrEmpty(StatusMessage))
{
    

#line default
#line hidden
#nullable disable
            __o = 
#nullable restore
#line 31 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                             IsError ? "alert-danger" : "alert-success"

#line default
#line hidden
#nullable disable
            ;
#nullable restore
#line 32 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
   __o = StatusMessage;

#line default
#line hidden
#nullable disable
#nullable restore
#line 33 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
         if (!string.IsNullOrEmpty(NewPlaylistLink))
        {
            

#line default
#line hidden
#nullable disable
            __o = 
#nullable restore
#line 35 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                 NewPlaylistLink

#line default
#line hidden
#nullable disable
            ;
#nullable restore
#line 35 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                                             __o = NewPlaylistLink;

#line default
#line hidden
#nullable disable
#nullable restore
#line 35 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
                                                                                                          
        }

#line default
#line hidden
#nullable disable
#nullable restore
#line 37 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
          
}

#line default
#line hidden
#nullable disable
       

          

       

                                                                                  

       
        }
        #pragma warning restore 1998
#nullable restore
#line 46 "/Users/anonymous/Source/UltimateJukebox/src/UltimateJukebox.Shared/Components/Pages/ShufflePlaylist.razor"
       
    private string? PlaylistUrlOrId { get; set; }
    private bool IsShuffling { get; set; } = false;
    private string? StatusMessage { get; set; }
    private bool IsError { get; set; } = false;
    private string? NewPlaylistLink { get; set; } // To store the link to the new playlist

// private bool IsSpotifyAuthenticated =>
!string.IsNullOrEmpty(HttpContextAccessor.HttpContext?.Session?.GetString("Spotify_AccessToken"));

private async Task HandleShufflePlaylist()
    {
        IsShuffling = true;
        StatusMessage = "Starting shuffle process...";
        IsError = false;
        NewPlaylistLink = null;
        StateHasChanged(); // Update UI to show spinner

        if (string.IsNullOrWhiteSpace(PlaylistUrlOrId))
        {
            StatusMessage = "Playlist URL or ID cannot be empty.";
            IsError = true;
            IsShuffling = false;
            return;
        }

        // Dummy delay to simulate work - replace with actual service call
        await Task.Delay(2000);

        // --- This is where we will call the service ---
        // try
        // {
        // (bool success, string message, string? newPlaylistUrl) = await PlaylistShuffler.ShufflePlaylistAsync(PlaylistUrlOrId,
        CancellationToken.None);
        // StatusMessage = message;
        // IsError = !success;
        // NewPlaylistLink = newPlaylistUrl;
        // }
        // catch (Exception ex)
        // {
        // StatusMessage = $"An unexpected error occurred: {ex.Message}";
        // IsError = true;
        // }
        // finally
        // {
        // IsShuffling = false;
        // }

        // --- Placeholder for now ---
        StatusMessage = "Shuffle process would happen here. Service call is commented out.";
        // IsError = false; // Or true if simulating an error
        // NewPlaylistLink = "https://open.spotify.com/playlist/yourNewPlaylistID"; // Simulate link
        IsShuffling = false;
        // --- End Placeholder ---

        StateHasChanged(); // Update UI with result
    }

#line default
#line hidden
#nullable disable
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private NavigationManager NavigationManager { get; set; }
    }
}
#pragma warning restore 1591

// 52

Projected Html document:

Expand

////////////////////// Projected Html as seen by extension ///////////////////////
/*~*/ /*~~~~~~*/
/*~~~*/ /*~~~~~~~~~~~~~*/ /*~~~~~~~~~~~~~*/ // For potential future redirects
~~ /*~~~*/ /*~~~~~~~~~~~~~~~~~~~*/ /*~~~~~~~~~~~~*/ ~~ /*~*/ /*~~~~~*/ /**/ /*~*/
/*~~~*/ /*~~~~~~~~~~~~~~~~*/ /*~~~~~~~~~~~~~~~*/ ~~ ~~ /*~*/ ~~~ /**/ ~~

<h3>Shuffle Spotify Playlist</h3>

~~ /*~*/ ~~~ ~ /*~*/ /**/ /*~*/ ~~ /**/ /**/ /**/ ~~ ~~~ /**/ ~~ /*~~~~~~~~~*/ ~~
~~ ~~~ /*~~~~~~~~~~~~~~~~~~~~*/ ~~
~~ ~ ~~
<div class="mb-3">
    <label for="playlistUrlOrId" class="form-label">Spotify Playlist URL or ID:</label>
    <input type="text" class="form-control" id="playlistUrlOrId" ~bind="/*~~~~~~~~~~~*/"
        placeholder="Enter Spotify Playlist URL or ID" />
</div>

<button class="btn btn-primary" ~onclick="/*~~~~~~~~~~~~~~~~~*/" disabled="/*~~~~~~~~*/">
    ~~~ /*~~~~~~~~~*/
    ~
        <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
        <span> Shuffling...</span>
    ~
    /**/
    ~
        <span>Shuffle Playlist</span>
    ~
</button>

~~~ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
~
    <div class="mt-3 alert /*~~~~~*/ ~ /*~~~~~~~~~~*/ ~ /*~~~~~~~~~~~~*/" role="alert">
        /*~~~~~~~~~~*/
        ~~~ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ~
            <p>View your new playlist: <a href="/*~~~~~~~~~~~~*/" target="_blank">/*~~~~~~~~~~~~*/</a></p>
        ~
    </div>
~
~~ ~ ~~
~~ /**/ ~~
~~ ~ ~~
~~ /*~~~~~*/ ~~ /*~~~~~~~~*/ ~~ /**/ /*~~~~~~~*/ /*~*/ ~~ ~~~ /**/ /*~~~~~~~~*/ ~~
~~ ~ ~~


/*~*/ ~
    /*~~~*/ /*~~~*/ /*~~~~~~~~~~~*/ ~ /**/ /**/ ~
    /*~~~*/ /**/ /*~~~~~~~*/ ~ /**/ /**/ ~ ~ /*~~*/
    /*~~~*/ /*~~~*/ /*~~~~~~~~~*/ ~ /**/ /**/ ~
    /*~~~*/ /**/ /*~~~*/ ~ /**/ /**/ ~ ~ /*~~*/
    /*~~~*/ /*~~~*/ /*~~~~~~~~~~~*/ ~ /**/ /**/ ~ ~~ ~~ /*~*/ ~~~ /**/ ~~ ~~~ ~~~ /*~~~~*/

~~ /*~~~*/ /**/ /*~~~~~~~~~~~~~~~~~~*/ ~~
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

/*~~~*/ /*~*/ /**/ /*~~~~~~~~~~~~~~~~~~~*/
    ~
        /*~~~~~~~*/ ~ /*~*/
        /*~~~~~~~~~*/ ~ /*~~~~~*/ /*~~~*/ /*~~~~~~~~*/
        /*~~~*/ ~ /*~~*/
        /*~~~~~~~~~~~*/ ~ /*~*/
        /*~~~~~~~~~~~~~~*/ ~~ /*~~*/ ~~ ~~ /**/ /*~~~*/

        ~~ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ~
            /*~~~~~~~~~*/ ~ /*~~~~~*/ ~~~ ~~ ~~ /*~~*/ ~~ /*~~~~*/
            /*~~~*/ ~ /*~*/
            /*~~~~~~~*/ ~ /*~~*/
            /*~~~*/
        ~

        ~~ /*~*/ /*~*/ ~~ /*~~~~*/ /**/ ~ /*~~~*/ /**/ /*~~*/ /*~~~*/ /**/
        /*~*/ /*~~~~~~~~~~~~~*/

        ~~ ~~~ /**/ ~~ /*~*/ ~~ /**/ /**/ ~~~ /*~~~*/ ~~~
        ~~ ~~~
        ~~ ~
        ~~ /*~*/ /*~~~~*/ /*~~*/ /*~~~~*/ /*~~~*/ /*~~~~~~~~~~~*/ ~ /*~*/ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*~~~~~~~~~~~~~~~~~~~~*/
        ~~ /*~~~~~~~~~*/ ~ /*~~~~*/
        ~~ /*~~~*/ ~ /*~~~~~*/
        ~~ /*~~~~~~~~~~~*/ ~ /*~~~~~~~~~~~*/
        ~~ ~
        ~~ /*~*/ /*~~~~~~*/ ~~~
        ~~ ~
        ~~ /*~~~~~~~~~*/ ~ /**/ /*~~~~~~*/ /*~*/ /*~~~~~*/ /*~~~~~~~~~~*/
        ~~ /*~~~*/ ~ /*~*/
        ~~ ~
        ~~ /*~~~*/
        ~~ ~
        ~~ /*~~~~~~~*/ ~ /*~~*/
        ~~ ~

        ~~ ~~~ /*~~~~~~~*/ ~~~ ~~~ ~~~
        /*~~~~~~~~~*/ ~ /*~~~~*/ /*~~~*/ /*~*/ /*~~*/ /*~*/ /*~~~*/ /**/ ~~ /*~~~~~*/ /*~~*/
        ~~ /*~~~*/ ~ /*~~*/ ~~ ~~ /**/ ~~ /*~~~~~~*/ ~~ /*~*/
        ~~ /*~~~~~~~~~~~*/ ~ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ ~~ /*~~~~*/ /**/
        /*~~~~~~~*/ ~ /*~~*/
        ~~ ~~~ ~~~ /*~~~~~~~*/ ~~~

        /*~~~~~~~~~~~~~~*/ ~~ /*~~*/ ~~ /**/ /*~~*/
    ~
~



////////////////////// Projected Html as seen by extension ///////////////////////
/*~*/ /*~~~~~~*/
/*~~~*/ /*~~~~~~~~~~~~~*/ /*~~~~~~~~~~~~~*/ // For potential future redirects
~~ /*~~~*/ /*~~~~~~~~~~~~~~~~~~~*/ /*~~~~~~~~~~~~*/ ~~ /*~*/ /*~~~~~*/ /**/ /*~*/
/*~~~*/ /*~~~~~~~~~~~~~~~~*/ /*~~~~~~~~~~~~~~~*/ ~~ ~~ /*~*/ ~~~ /**/ ~~

<h3>Shuffle Spotify Playlist</h3>

~~ /*~*/ ~~~ ~ /*~*/ /**/ /*~*/ ~~ /**/ /**/ /**/ ~~ ~~~ /**/ ~~ /*~~~~~~~~~*/ ~~
~~ ~~~ /*~~~~~~~~~~~~~~~~~~~~*/ ~~
~~ ~ ~~
<div class="mb-3">
    <label for="playlistUrlOrId" class="form-label">Spotify Playlist URL or ID:</label>
    <input type="text" class="form-control" id="playlistUrlOrId" ~bind="/*~~~~~~~~~~~*/"
        placeholder="Enter Spotify Playlist URL or ID" />
</div>

<button class="btn btn-primary" ~onclick="/*~~~~~~~~~~~~~~~~~*/" disabled="/*~~~~~~~~*/">
    ~~~ /*~~~~~~~~~*/
    ~
        <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
        <span> Shuffling...</span>
    ~
    /**/
    ~
        <span>Shuffle Playlist</span>
    ~
</button>

~~~ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
~
    <div class="mt-3 alert /*~~~~~*/ ~ /*~~~~~~~~~~*/ ~ /*~~~~~~~~~~~~*/" role="alert">
        /*~~~~~~~~~~*/
        ~~~ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ~
            <p>View your new playlist: <a href="/*~~~~~~~~~~~~*/" target="_blank">/*~~~~~~~~~~~~*/</a></p>
        ~
    </div>
~
~~ ~ ~~
~~ /**/ ~~
~~ ~ ~~
~~ /*~~~~~*/ ~~ /*~~~~~~~~*/ ~~ /**/ /*~~~~~~~*/ /*~*/ ~~ ~~~ /**/ /*~~~~~~~~*/ ~~
~~ ~ ~~


/*~*/ ~
    /*~~~*/ /*~~~*/ /*~~~~~~~~~~~*/ ~ /**/ /**/ ~
    /*~~~*/ /**/ /*~~~~~~~*/ ~ /**/ /**/ ~ ~ /*~~*/
    /*~~~*/ /*~~~*/ /*~~~~~~~~~*/ ~ /**/ /**/ ~
    /*~~~*/ /**/ /*~~~*/ ~ /**/ /**/ ~ ~ /*~~*/
    /*~~~*/ /*~~~*/ /*~~~~~~~~~~~*/ ~ /**/ /**/ ~ ~~ ~~ /*~*/ ~~~ /**/ ~~ ~~~ ~~~ /*~~~~*/

~~ /*~~~*/ /**/ /*~~~~~~~~~~~~~~~~~~*/ ~~
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

/*~~~*/ /*~*/ /**/ /*~~~~~~~~~~~~~~~~~~~*/
    ~
        /*~~~~~~~*/ ~ /*~*/
        /*~~~~~~~~~*/ ~ /*~~~~~*/ /*~~~*/ /*~~~~~~~~*/
        /*~~~*/ ~ /*~~*/
        /*~~~~~~~~~~~*/ ~ /*~*/
        /*~~~~~~~~~~~~~~*/ ~~ /*~~*/ ~~ ~~ /**/ /*~~~*/

        ~~ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ~
            /*~~~~~~~~~*/ ~ /*~~~~~*/ ~~~ ~~ ~~ /*~~*/ ~~ /*~~~~*/
            /*~~~*/ ~ /*~*/
            /*~~~~~~~*/ ~ /*~~*/
            /*~~~*/
        ~

        ~~ /*~*/ /*~*/ ~~ /*~~~~*/ /**/ ~ /*~~~*/ /**/ /*~~*/ /*~~~*/ /**/
        /*~*/ /*~~~~~~~~~~~~~*/

        ~~ ~~~ /**/ ~~ /*~*/ ~~ /**/ /**/ ~~~ /*~~~*/ ~~~
        ~~ ~~~
        ~~ ~
        ~~ /*~*/ /*~~~~*/ /*~~*/ /*~~~~*/ /*~~~*/ /*~~~~~~~~~~~*/ ~ /*~*/ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*~~~~~~~~~~~~~~~~~~~~*/
        ~~ /*~~~~~~~~~*/ ~ /*~~~~*/
        ~~ /*~~~*/ ~ /*~~~~~*/
        ~~ /*~~~~~~~~~~~*/ ~ /*~~~~~~~~~~~*/
        ~~ ~
        ~~ /*~*/ /*~~~~~~*/ ~~~
        ~~ ~
        ~~ /*~~~~~~~~~*/ ~ /**/ /*~~~~~~*/ /*~*/ /*~~~~~*/ /*~~~~~~~~~~*/
        ~~ /*~~~*/ ~ /*~*/
        ~~ ~
        ~~ /*~~~*/
        ~~ ~
        ~~ /*~~~~~~~*/ ~ /*~~*/
        ~~ ~

        ~~ ~~~ /*~~~~~~~*/ ~~~ ~~~ ~~~
        /*~~~~~~~~~*/ ~ /*~~~~*/ /*~~~*/ /*~*/ /*~~*/ /*~*/ /*~~~*/ /**/ ~~ /*~~~~~*/ /*~~*/
        ~~ /*~~~*/ ~ /*~~*/ ~~ ~~ /**/ ~~ /*~~~~~~*/ ~~ /*~*/
        ~~ /*~~~~~~~~~~~*/ ~ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ ~~ /*~~~~*/ /**/
        /*~~~~~~~*/ ~ /*~~*/
        ~~ ~~~ ~~~ /*~~~~~~~*/ ~~~

        /*~~~~~~~~~~~~~~*/ ~~ /*~~*/ ~~ /**/ /*~~*/
    ~
~

// 52

Machine information

VSCode version: 1.99.3
Razor.VSCode version: 2.72.34

dotnet --info

Expand

.NET SDK:
 Version:           9.0.200
 Commit:            90e8b202f2
 Workload version:  9.0.200-manifests.78a0f7ac
 MSBuild version:   17.13.8+cbc39bea8

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  15.4
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/9.0.200/

.NET workloads installed:
 [maui]
   Installation Source: SDK 9.0.200
   Manifest Version:    9.0.51/9.0.100
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/9.0.100/microsoft.net.sdk.maui/9.0.51/WorkloadManifest.json
   Install Type:        FileBased

Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.2
  Architecture: arm64
  Commit:       80aa709f5d

.NET SDKs installed:
  6.0.403 [/usr/local/share/dotnet/sdk]
  7.0.100 [/usr/local/share/dotnet/sdk]
  8.0.302 [/usr/local/share/dotnet/sdk]
  9.0.200 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Extensions

Expand

Extension Author Version
auto-rename-tag formulahendry 0.1.10
better-comments aaron-bond 3.0.2
catppuccin-vsc Catppuccin 3.17.0
catppuccin-vsc-icons Catppuccin 1.21.0
csdevkit ms-dotnettools 1.18.25
csharp ms-dotnettools 2.72.34
docker docker 0.6.0
dotnet-maui ms-dotnettools 1.9.21
dotnet-test-explorer formulahendry 0.7.8
EditorConfig EditorConfig 0.17.2
errorlens usernamehw 3.26.0
geminicodeassist google 2.32.0
german-scroll Turiiya 0.2.3
git-log--graph phil294 0.1.23
githistory donjayamanne 0.6.20
gitignore codezombiech 0.10.0
gitlens eamodio 17.0.3
hungry-delete jasonlhy 1.7.0
macos-modern-theme davidbwaters 2.3.19
material-icon-theme PKief 5.22.0
nord-visual-studio-code arcticicestudio 0.19.0
op-vscode 1Password 1.0.5
prettier-vscode esbenp 11.0.0
prettyxml PrateekMahendrakar 6.0.0
remote-containers ms-vscode-remote 0.414.0
remote-explorer ms-vscode 0.4.3
remote-repositories ms-vscode 0.42.0
remote-server ms-vscode 1.5.2
remote-ssh ms-vscode-remote 0.120.0
remote-ssh-edit ms-vscode-remote 0.87.0
remote-wsl ms-vscode-remote 0.99.0
remotehub GitHub 0.64.0
roslynator josefpihrt-vscode 4.13.1
shell-format foxundermoon 7.2.5
shell-syntax bmalehorn 1.0.5
snippet-generator wenfangdu 0.3.8
snippetsmanager zjffun 0.3.16
TabOut albert 0.2.2
test-adapter-converter ms-vscode 0.2.1
theme-dracula dracula-theme 2.25.1
todo-tree Gruntfuggly 0.0.226
vim vscodevim 1.29.0
vscode-better-align chouzz 1.4.2
vscode-docker ms-azuretools 1.29.6
vscode-dotnet-runtime ms-dotnettools 2.3.3
vscode-github-actions github 0.27.1
vscode-nuget-gallery patcx 1.2.3
vscode-pull-request-github GitHub 0.108.0
vscode-sqlite alexcvzz 0.14.1
vscode-xml-complete rogalmic 0.3.0
vscode-yaml redhat 1.18.0

@davidwengier davidwengier pinned this issue May 9, 2025
@davidwengier davidwengier unpinned this issue May 9, 2025
@davidwengier
Copy link
Member

@Laptop765 thanks for logging this. I thought we had a duplicate issue, but I can't find it, so will leave this open.

This is caused by the VS Code html formatter automatically wrapping long lines, with the default being at 120 characters. The line that is breaking is 126 characters long.

As a workaround until we can get a fix, you can turn that off by setting the Html Wrap Line Length setting to 0:
Image

@Laptop765
Copy link
Author

Ahh okay thanks for the workaround! I did my best to search for an existing issue before posting but couldn't find a suitable one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants