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

Wrapping some extra components inside of the Context Menu Component #4262

Closed
5 tasks done
tgberkeley opened this issue Oct 29, 2024 · 17 comments · Fixed by #4831
Closed
5 tasks done

Wrapping some extra components inside of the Context Menu Component #4262

tgberkeley opened this issue Oct 29, 2024 · 17 comments · Fixed by #4831
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tgberkeley
Copy link
Collaborator

tgberkeley commented Oct 29, 2024

For the context menu we have not wrapped some of the components.

We wrap the context menu here in the code: https://github.com/reflex-dev/reflex/blob/main/reflex/components/radix/themes/components/context_menu.py and we want to add these other sub-components mentioned above with all their props and event handlers.

@tgberkeley tgberkeley added the good first issue Good for newcomers label Oct 29, 2024
Copy link

linear bot commented Oct 29, 2024

@tgberkeley tgberkeley added the help wanted Extra attention is needed label Oct 29, 2024
@LucasOcampos
Copy link

Hey @tgberkeley! I would love to contribute to Reflex, the link that the linear bot posted is not opening up for me though. Is this task still available?

@Lendemor
Copy link
Collaborator

The link posted by the linear bot doesn't have additional info, it's just there for tracking in our private linear.
Since the task is still open, it's available yes.

@LucasOcampos
Copy link

Awesome, if you could set me as assignee for this task please, I'd appreciate it!

@KarinaNi
Copy link

KarinaNi commented Dec 1, 2024

Hi @tgberkeley and @Lendemor if possible I would love to be assigned to this issue. I have got the project locally working and have an idea of how to wrap these components. If this is available, please assign it to me.

@vydpnguyen
Copy link
Contributor

Hi @tgberkeley and @KarinaNi, I would love to collaborate with you two and take over the CheckboxItem part.

@Lendemor
Copy link
Collaborator

Lendemor commented Dec 6, 2024

Updated the initial post with a checklist for the missing components.
@LucasOcampos @vydpnguyen @KarinaNi feel free to pick up any of the components in there and submit them.

The PR for the checkbox seems to works, we just need the others now 👍

@KarinaNi
Copy link

KarinaNi commented Dec 6, 2024

Hi,
I can do radiogroup and radio item.

Lendemor added a commit that referenced this issue Dec 13, 2024
* Add ContextMenuCheckBoxItem component

* Remove toggle_state method

* Import Checkbox and implement ContextMenuCheckbox class

* Change parameter for create function

* Reformat code and import block

* Removed unused vars

* Format file

* Remove create method

* Reformat code

* Update reflex/components/radix/themes/components/context_menu.py

Co-authored-by: Thomas Brandého <[email protected]>

* Update reflex/components/radix/themes/components/context_menu.py

Co-authored-by: Thomas Brandého <[email protected]>

* Update reflex/components/radix/themes/components/context_menu.py

Co-authored-by: Thomas Brandého <[email protected]>

* Update reflex/components/radix/themes/components/context_menu.py

Co-authored-by: Thomas Brandého <[email protected]>

* Reformat code

* Add automatically modified pyi file

* Update context_menu.pyi file

---------

Co-authored-by: Thomas Brandého <[email protected]>
@vydpnguyen
Copy link
Contributor

Hi @KarinaNi, how are the RadioGroup and RadioItem going for you? I've finished the CheckBoxItem part.

@KarinaNi
Copy link

Hi, I shall try to finish it by today. I added all items so ill just commit the radio ones so give me a bit of time so i finish that

@KarinaNi
Copy link

KarinaNi commented Dec 15, 2024

update: finished making the changes in code. Trying to get all success in the tests

poetry run ruff check .
poetry run pyright reflex tests
find reflex tests -name "*.py" -not -path reflex/reflex.py | xargs poetry run darglint

currently getting errors related to navbar, table etc in pyright reflex tests

@Lendemor
Copy link
Collaborator

update: finished making the changes in code. Trying to get all success in the tests

poetry run ruff check .
poetry run pyright reflex tests
find reflex tests -name "*.py" -not -path reflex/reflex.py | xargs poetry run darglint

currently getting errors related to navbar, table etc in pyright reflex tests

You should pip install pre-commit
then pre-commit install
If you are just adding new components it should not break any of the existing tests.

@KarinaNi
Copy link

After doing that, I seem to get more errors than before (422errors, 2 warning)
Python version - 3.11.0

any idea what could be causing it and how to fix it?

@KarinaNi
Copy link

Hi, any update on this would be highly appreciate. I really like this project and would love to contribute more

@Lendemor
Copy link
Collaborator

If you get so many errors it's possible you have a version of pyright that is too recent compared to the one being used on Reflex.

We're working on updating to latest pyright so soon it shouldn't be a problem anymore.

@Lendemor
Copy link
Collaborator

Also, even if it's a work in progress, feel free to open a PR/ Draft PR so we can actually look at the change you made and test them locally, it'll be easier for any team member to help you 👍

slackroo added a commit to slackroo/reflex that referenced this issue Feb 17, 2025
@slackroo
Copy link
Contributor

@Lendemor i have created a pull request Wrapping extra components inside of the Context Menu Component #4831. Do let me know any additional changes required .

adhami3310 added a commit that referenced this issue Feb 19, 2025
* Wrapping extra components inside of the Context Menu Component  (partial fix for #4262) label, group, radio, radio_group

* removed unwanted changes

* removed codespell ignores and pyright type checking ignores

* remove misc changes

---------

Co-authored-by: Khaleel Al-Adhami <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants