question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Customizable progress bar

See original GitHub issue

Proposal: Customizable progress bar

Reasoning: At the moment it feels clunky to only be able to pass boolean to noProgressBar and being able to pass progressBarColor as the only means of customization since you can’t even detect at the moment when the data was actually passed to onFileLoad or onDrop

  • Option 1: Access progress value directly from child render function

    The same way you can currently access the file inside the child render function

    Before ⏳

    <CSVReader>
      {({ file }) => (
         // render
      )}
    </CSVReader>
    

    After ⌛

    <CSVReader>
      {({ file, progress }) => (
         // render
      )}
    </CSVReader>
    
  • Option 2: Allow users to pass custom progress bar render callback function

    This way the users will have greater control as to how the progress bar is displayed

    After ⌛

    // CSVReader.tsx
    
    type Props = {
      // optional, defaults to existing one
      renderProgressBar?: (...args: any[]) => (progress: number) => JSX.Element
    }
    
    // later in render method
    render () {
    
       const { renderProgressBar } = this.props
       const { progressBar } = this.state 
    
       return (
          // other stuff
         { progressBar 
            ? renderProgressBar(progressBar)
            : <ProgressBar />
         }
       )
    }
    

This way the users could customize the progress bar without introducing breaking changes to the existing implementation while making it more flexible.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
samuelhullacommented, Aug 2, 2020

@Bunlong Yeah sure why not. I mean I sadly don’t quite get what would be the issue with dropping, even after forking and doing closer inspection, but when it comes to lifting the state to the render function, it really is just a one-liner (#45)

0reactions
Bunlongcommented, Aug 3, 2020

@samuelhulla I do appreciate your help and we will merge into the master for next release/version. You are added to the contributor list. Thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Powerpoint progress bar template - Prezi
Get inspiration for Powerpoint Progress Bar Template. ... for your next sales or marketing proposal. All Prezi presentation templates are easily customized.
Read more >
August 11, 2022 – Comment reactions, progress bars & more
Show numbers & formulas as progress bars ... Visualize the engineering investment for proposed projects, size of sales opportunities, or progress ...
Read more >
OnVoard: AOV Progress Bar | Wix App Market
- Customizable progress bar. Change style based on your store design. - Inherit fonts from your store. Keep styles consistent with your brand....
Read more >
Proposals | Wethos Help Center
After building out your scope, select create proposal. Within the proposal, you'll see your scope, your studio's logo and bio, and the proposal...
Read more >
Creating a custom progress bar - android - Stack Overflow
The best options I've found to create a circle progress bar are these libraries which you can find on Github:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found