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

Add support for custom name in @progress (ProgressLogging.jl) #2966

Merged
merged 8 commits into from
Aug 5, 2024

Conversation

disberd
Copy link
Contributor

@disberd disberd commented Jul 20, 2024

This PR adds support for the visualization of custom names of progress bars created with @progress from ProgressLogging.

I also added a small sync icon to the logs of ProgressLogging as there was no icon at the moment.

Before this PR

image

After the PR:

image

Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/disberd/Pluto.jl", rev="show_progress_name")
julia> using Pluto

@disberd
Copy link
Contributor Author

disberd commented Jul 20, 2024

@fonsp
We could also defaults to the name Progress in case no name was provided as done in the REPL when using TerminalLoggers.jl
image

I fine with either option, as the important part is to have the name displayed when it's actually provided in my opinion

@fonsp
Copy link
Owner

fonsp commented Jul 21, 2024

Nice! I didn't know about names but thats a very useful feature!

I'm not sure about the sync icon, I feel like it's not necessary because a progress bar is familiar. Or do you think this needs to be communicated better?

@disberd
Copy link
Contributor Author

disberd commented Jul 21, 2024

I just thought it felt strange not to have an icon when every other log had one, but I don't have a very strong opinion on this so we can also just ditch it

Copy link
Owner

@fonsp fonsp left a comment

Choose a reason for hiding this comment

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

Okay! Let's remove the icon.

The rest looks good! Two tweaks you can make:

  • remove the console log
  • use the CSS :empty pseudo-class instead of calculating it yourself

@disberd
Copy link
Contributor Author

disberd commented Jul 23, 2024

Thanks, did not know about the :empty selector, definitely better.

I removed the icon and applied the suggested changes, with this visual result:
image

@fonsp
Copy link
Owner

fonsp commented Aug 5, 2024

Thanks so much! Sorry, my holiday got inbetween 🙈

@fonsp fonsp merged commit 0e9b423 into fonsp:main Aug 5, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants