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: Setting Loading in FluentButton bound to FluentInputFile breaks it #2754

Open
Leon99 opened this issue Oct 3, 2024 · 3 comments
Open
Labels
community:contribution Issue will/can be addressed by community contribution community:good-first-issue Good issues for first time contributors status:blocked Any issue blocked by another

Comments

@Leon99
Copy link

Leon99 commented Oct 3, 2024

🐛 Bug Report

After setting Loading in FluentButton bound to FluentInputFile, it won't open the file browse dialog anymore.

💻 Repro or Code Sample

                    <FluentButton
                        Id="form-browse-button"
                        Loading="_formUploading">
                        Upload...
                    </FluentButton>
                <FluentInputFile
                    Accept="application/pdf"
                    AnchorId="form-browse-button"
                    DragDropZoneVisible="false"
                    Id="form-file-uploader"
                    Mode="InputFileMode.SaveToTemporaryFolder"
                    OnCompleted="OnFormUploadCompleted"
                    OnProgressChange="OnFormUploading"/>
@code {
    bool _formUploading;
    void OnFormUploading()
    {
        _formUploading = true;
    }
    async Task OnFormUploadCompleted(IEnumerable<FluentInputFileEventArgs> files)
    {
        _formUploading = false;
    }
}

🌍 Your Environment

  • OS & Device: Windows on PC
  • Browser: Microsoft Edge, Mozilla FireFox
  • .NET and Fluent UI Blazor library Version: 8.0.400/4.10.1
@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Oct 3, 2024
@vnbaaij vnbaaij added status:needs-investigation Needs additional investigation and removed triage New issue. Needs to be looked at labels Oct 3, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Oct 3, 2024

I can't find what is causing this. As an alternative I would use the Disabled property instead. Tested that and can confirm it works.

Will leave this open for a bit but it is not going to be treated as a high priority issue.

@vnbaaij vnbaaij added status:blocked Any issue blocked by another and removed status:needs-investigation Needs additional investigation labels Oct 3, 2024
@Leon99
Copy link
Author

Leon99 commented Oct 4, 2024

Thanks @vnbaaij, Disabled plus a separate ProgressRing is what I ended up doing as a workaround. Would be good to, at least, make a note of this limitation in the documentation, to make sure others don't spend as much time as I did trying to localize the issue upon testing a number of changes. I'd say it's not an unexpected use case, since file uploading always requires a progress indicator and using Loading on a button seems to be the easiest way to do it.

@vnbaaij vnbaaij added community:good-first-issue Good issues for first time contributors community:contribution Issue will/can be addressed by community contribution labels Oct 4, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Oct 4, 2024

Thanks @vnbaaij, Disabled plus a separate ProgressRing is what I ended up doing as a workaround. Would be good to, at least, make a note of this limitation in the documentation, to make sure others don't spend as much time as I did trying to localize the issue upon testing a number of changes.

Yes, I'll make a note of that. This is supper 'low hanging fruit' where you can help the community yourself (an us) by creating a simple PR for it.

I'd say it's not an unexpected use case, since file uploading always requires a progress indicator and using Loading on a button seems to be the easiest way to do it.

It is not an unexpected use case indeed, but you are the first person that has reported this in the ~2.5 years we've had this component.

I'm adding the 'community:good-first-issue' and 'community:contribution' labels with the hope that someone is willing to dive into this deeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community:contribution Issue will/can be addressed by community contribution community:good-first-issue Good issues for first time contributors status:blocked Any issue blocked by another
Projects
None yet
Development

No branches or pull requests

2 participants