-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: Status controls could have a way to have icons instead of the default letters #2177
feat: Status controls could have a way to have icons instead of the default letters #2177
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tx @Vaibhav91one Looks good
need tests
what if
- the dev does not want icons but wants to keep the initials ?
- the dev wants to set its own icons ?
So, the dev can use |
I suppose I was not clear enough. |
Oh, I thought a developer from taipy team, mb. So, for the |
|
Hmm, Got it will look into it and update the PR. |
Hey @FredLL-Avaiga , I was adding the requested changes and require some guidance, please look into the following, In the statusProps I have added the following:
And then the function for choosing whether it will be initials, icon or customSvg
Later in status component, I am taking the props and using them,
My py script is the following:
The issue here is I am not able to read the props being passed, I don't seem to get what I am doing wrong. |
Why don't you update your PR with this changes so that we can discuss on something concrete ? taipy/taipy/gui/_renderers/factory.py Line 543 in 3621961
you cannot pass a ReactNode typed property, but you can pass an URL or a svg string, like it's done in the image component.
|
Will do this and update the PR. |
Hi @FredLL-Avaiga , sorry for disturbing again, but after making changes in factory.py, do I need to do anything else besides running npm run build:dev in taipy-gui. Also, I tried to run factory.py but it showed the following error.
|
You need to create a python script and run it to show your component on a page |
Oh, that's clear to me, the python script is working. The only thing I am not understanding is the property. As you guided I created a taipy/taipy/gui/_renderers/factory.py:
Python Script:
Status Component:
|
|
Tried the above, still not working. |
|
Oh, will do that. Thanks @FredLL-Avaiga. |
…bug/Avaiga#1157-feat-improv-status-control
…github.com/Vaibhav91one/taipy into bug/Avaiga#1157-feat-improv-status-control
Hi @FredLL-Avaiga, did the requested changes PFA, screenshots and python script for testing. Python Script for debugging:
|
can you fix the linter issues ? |
Yeah will do that, It was in |
…bug/Avaiga#1157-feat-improv-status-control
…bug/Avaiga#1157-feat-improv-status-control
…github.com/Vaibhav91one/taipy into bug/Avaiga#1157-feat-improv-status-control
@FredLL-Avaiga Did the requested changes and added few test cases. |
front end test fails |
…bug/Avaiga#1157-feat-improv-status-control
…github.com/Vaibhav91one/taipy into bug/Avaiga#1157-feat-improv-status-control
Hi @FredLL-Avaiga , it was |
Thank you @Vaibhav91one ! |
Thank you @jrobinAV and @FredLL-Avaiga thank you for the guidance, learned a lot. |
hey @Vaibhav91one congratulations! |
resolves #1157