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

Added basic implementation to toggle the placeholder text #15321

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

navdeepgill14
Copy link

@navdeepgill14 navdeepgill14 commented Oct 29, 2023

References

Closes #15138

Code changes

  1. Introduced a global state variable isPlaceholderVisible in widget.ts to manage the visibility of the placeholder text.
  2. Implemented a function toggleGlobalPlaceholderVisibility in widget.ts to toggle the visibility state.
  3. Added conditional rendering logic in the cell widget rendering method in widget.ts to show/hide the placeholder based on the isPlaceholderVisible state.

User-facing changes

  1. Users will see a toggle button in the notebook toolbar. Clicking this button will show or hide the placeholder text in the notebook cells.
  2. This provides users with the flexibility to choose whether they want to see the placeholder text or not.

Backwards-incompatible changes

None. The changes introduced are compatible with the existing JupyterLab public APIs and do not break any existing functionality.

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@welcome
Copy link

welcome bot commented Oct 29, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@krassowski
Copy link
Member

Thanks for starting this. We cannot add a new toolbar button for every setting, this should be rewritten to be a setting in Notebook schema instead. Please do ask if you need pointers.

@krassowski krassowski added this to the 4.1.0 milestone Oct 29, 2023
@navdeepgill14
Copy link
Author

Thank you for the feedback, @krassowski . I understand the concern about adding too many toolbar buttons. I'll work on moving this functionality to the Notebook schema as a setting. I'm relatively new to this, so I'd appreciate any pointers or guidance you can provide on how to best implement this in the Notebook schema. Thanks for your patience and support!

@krassowski
Copy link
Member

A recent PR that implemented a new Notebook setting was #13944 - have a look at which files were modified in there to thread inputHistoryScope down.

@krassowski krassowski modified the milestones: 4.1.0, 4.2.0 Nov 2, 2023
@krassowski krassowski marked this pull request as draft April 17, 2024 16:46
@krassowski
Copy link
Member

@navdeepgill14 are you still interested in working on this?

@krassowski krassowski modified the milestones: 4.2.0, 4.3.0 Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to disable input placeholder text
2 participants