taipy icon indicating copy to clipboard operation
taipy copied to clipboard

Add progress bar/circle visual element

Open FlorianJacta opened this issue 1 year ago • 36 comments

What would that feature address Add progress bar/circle visual element to Taipy: example

image

Parent issue: #436 Linked to: #551

Acceptance Criteria

  • [ ] Ensure new code is unit tested, and check code coverage is at least 90%
  • [ ] Create related issue in taipy-doc for documentation and Release Notes
  • [ ] Check if a new demo could be provided based on this, or if legacy demos could be benefit from it
  • [ ] Ensure any change is well documented

FlorianJacta avatar Jan 16 '24 09:01 FlorianJacta

Really looking forward to this feature. I've a UI that pulls data, which may have a few seconds to a min. Need to provide some feedback to the user while they are waiting.

manojkr19 avatar Feb 23 '24 15:02 manojkr19

For the meantime, you can use the notify function to create a notification saying that the user has to wait.

FlorianJacta avatar Feb 23 '24 16:02 FlorianJacta

Another user on Discord asked for it again. I am moving this to High as a result.

FlorianJacta avatar Mar 05 '24 13:03 FlorianJacta

Hi, I would like to contribute to this issue. Could you please assign it to me?

chialiotta avatar Mar 05 '24 14:03 chialiotta

That is great news Chiara! You are going to need Python, Typescript, React, and MUI, but that should be fun!

We would like a new control called 'progress', using the referenced MUI component. We'll improve on the requirements when something is usable on the front-end.

Welcome to Taipy!

FabienLelaquais avatar Mar 05 '24 15:03 FabienLelaquais

Do not hesitate to ask questions here 😎

FredLL-Avaiga avatar Mar 06 '24 08:03 FredLL-Avaiga

Great, thank you! Will do :)

chialiotta avatar Mar 06 '24 09:03 chialiotta

Hello, I have started to work on the React components, however, I want to make sure I'm taking all the steps required. I have made a .tsx and .spec.tsx and from what I understand I now need to update factory.py and then tests to both tests/gui/builder/control and tests/gui/control. What exactly is the difference between these last two? Also, maybe a dumb question, but how can I locally visually test out the generation of the new component?

chialiotta avatar Mar 29 '24 13:03 chialiotta

test/gui/builder/control uses the Builder API while test/gui/control uses Markdown/HTML Don't forget to update the viselements.json file (used in the doc for for API generation)

Once you've built the front-end bundle To test, you can create a demo python file at the root of the repo and it will use the current version of Taipy without installing it

FredLL-Avaiga avatar Mar 29 '24 13:03 FredLL-Avaiga

I built the frontend bundle and created a demo file, but it tells me that the new component is not registered. How am I supposed to register it?

chialiotta avatar Mar 30 '24 21:03 chialiotta

There's an export.ts file I think

FredLL-Avaiga avatar Mar 30 '24 21:03 FredLL-Avaiga

Unfortunately that doesn't seem to fix it

chialiotta avatar Mar 30 '24 22:03 chialiotta

What would that feature address Add progress bar/circle visual element to Taipy: example

image

Parent issue: #436 Linked to: #551

Acceptance Criteria

  • [ ] Ensure new code is unit tested, and check code coverage is at least 90%
  • [ ] Create related issue in taipy-doc for documentation and Release Notes
  • [ ] Check if a new demo could be provided based on this, or if legacy demos could be benefit from it
  • [ ] Ensure any change is well documented

Hey @FlorianJacta, actually I was reading about this issue, but I was not able to understand this completely, could you please guide that where this visual element has to be added, like in what sense? And @chialiotta since you've previously worked on this issue, could you also please guide me regarding this, maybe we can work on this together?

yaten2302 avatar May 11 '24 11:05 yaten2302

Unfortunately that doesn't seem to fix it

Sorry, you need to add your component in the list in index.ts

FredLL-Avaiga avatar May 11 '24 13:05 FredLL-Avaiga

@yaten2302 Taipy relies on visual elements to bring interactivity to the GUI. These visual elements come from different Javascript libraries (MUI, for example). The goal is to incorporate another visual element into Taipy natively.

You can read about the extension API here. This API enables you to extend Taipy with a new object. However, we would want to add Taipy directly here. Maybe, @FredLL-Avaiga or @FabienLelaquais could help you with that

FlorianJacta avatar May 13 '24 07:05 FlorianJacta

Hey @FlorianJacta, if I've understood this correctly, what exactly we've to do is that, we've to create 2 new files in this dir named - Circle.tsx and Circle.spec.tsx(for testing). We're basically incorporating a new visual element in Taipy, right?

yaten2302 avatar May 15 '24 04:05 yaten2302

I think @chialiotta is working on this issue. Are you still working on it? Please let me know if you need any help.

If you are not, we could maybe assign you @yaten2302 and provide you with more explanation to keep things organized.

FlorianJacta avatar May 15 '24 07:05 FlorianJacta

Sure @FlorianJacta , if no one is working on this, I'll definitely work on this issue👍

yaten2302 avatar May 15 '24 13:05 yaten2302

Hey, I was working on this, but I don’t have time right now to finish it, so if you want to take over @yanten2302 you are welcome to


From: Yaten Dhingra @.> Sent: Wednesday, May 15, 2024 3:59:54 PM To: Avaiga/taipy @.> Cc: Liotta, Chiara @.>; Mention @.> Subject: Re: [Avaiga/taipy] Add progress bar/circle visual element (Issue #692)

Sure @FlorianJactahttps://github.com/FlorianJacta , if no one is working on this, I'll definitely work on this issue👍

— Reply to this email directly, view it on GitHubhttps://github.com/Avaiga/taipy/issues/692#issuecomment-2112628186, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANKTFWULKGHSLJQ43Z5K2JDZCNS5VAVCNFSM6AAAAABB4QMMI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJSGYZDQMJYGY. You are receiving this because you were mentioned.Message ID: @.***>

chialiotta avatar May 16 '24 08:05 chialiotta

Hey @FlorianJacta, could you please assign this issue to me, I want to work on it.

yaten2302 avatar May 16 '24 11:05 yaten2302

Welcome @yaten2302
do not hesitate to ask questions here.

FredLL-Avaiga avatar May 16 '24 13:05 FredLL-Avaiga

Thank you so much @FredLL-Avaiga for your help. Sure, I'll definitely ask if I encounter any problem or doubt. Currently I'm trying to understand the Button.tsx and Button.spec.tsx file in frontend dir. Then I'll start with the new element i.e. the progress bar 👍🏼

yaten2302 avatar May 16 '24 13:05 yaten2302

For your information, Once, your happy with the tsx component, you need to declare it in

  • taipy\gui\_renderers\factory.py and frontend\taipy-gui\src\components\Taipy\index.ts

FredLL-Avaiga avatar May 16 '24 14:05 FredLL-Avaiga

Hey @FredLL-Avaiga, to get started by developing the front-end part, I've to install both of these right? - Taipy Front-end and Taipy GUI Front-end

yaten2302 avatar May 17 '24 03:05 yaten2302

fine, but you don't need Taipy front-end as it concerns core visual elements (scenario_selector ...)

FredLL-Avaiga avatar May 17 '24 07:05 FredLL-Avaiga

Hey @FredLL-Avaiga, actually I've a doubt, could you clarify this? Like, for the progress bar, by default(if there are no params entered by the user) the element rendered will be this(the circular indeterminate one), right?
image
And if the user enters the params like - color, show_progress, then the element rendered will be like this:
image

yaten2302 avatar May 17 '24 15:05 yaten2302

You're right I'm not sure we want a color property but I'm sure we want a circular and another linear with the same element name

FredLL-Avaiga avatar May 17 '24 15:05 FredLL-Avaiga

Got it 👍🏼 I'll leave the color property for now and will add the circular and the linear progress bars👍🏼

yaten2302 avatar May 17 '24 17:05 yaten2302

Hey @FredLL-Avaiga, actually I was having a doubt, if I want to run only a specific file let's say - Button.tsx, then how can I do that? I'm asking this because I want to check the new element (it's not complete right now, but I just wanted to do a dry run kind of thing).

yaten2302 avatar May 18 '24 18:05 yaten2302

For your information, Once, your happy with the tsx component, you need to declare it in

  • taipy\gui\_renderers\factory.py and frontend\taipy-gui\src\components\Taipy\index.ts

You declare your component in those files And then you add it to a really page in python

FredLL-Avaiga avatar May 18 '24 19:05 FredLL-Avaiga