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

Find and Replace dialog box is not mobile-responsive #2839

Open
mrkirthi-24 opened this issue Jan 5, 2024 · 6 comments
Open

Find and Replace dialog box is not mobile-responsive #2839

mrkirthi-24 opened this issue Jan 5, 2024 · 6 comments
Assignees
Labels
Area:Editor For CodeMirror-related features Enhancement

Comments

@mrkirthi-24
Copy link

p5.js version

v1.9.0

What is your operating system?

Mac OS

Web browser and version

Google Chrome 120.0.6099.129

Actual Behavior

The dialog box hides behind the editor and hence user is unable to click on the input fields and buttons.

Screen.Recording.2024-01-05.at.4.07.56.PM.mov

Expected Behavior

The dialog box should appear above the editor.

Steps to reproduce

Steps:

  1. Open p5.js Web Editor in mobile screen
  2. In the Edit menu, click Replace option
  3. Find and Replace dialog box will appear
@mrkirthi-24 mrkirthi-24 added the Bug label Jan 5, 2024
@mrkirthi-24
Copy link
Author

Hi @lindapaiste I would like to work on the issue if validated.

@lindapaiste
Copy link
Collaborator

Hi @lindapaiste I would like to work on the issue if validated.

Yes please do, that's definitely a mistake.

@mrkirthi-24
Copy link
Author

Hello, @lindapaiste should I leave space such that the editor is fully visible, or should the dialogue box cover the editor like in the example below?

Screenshot 2024-01-06 at 10 35 33 PM

@lindapaiste
Copy link
Collaborator

Hello, @lindapaiste should I leave space such that the editor is fully visible, or should the dialogue box cover the editor like in the example below?

Screenshot 2024-01-06 at 10 35 33 PM

Good question! I didn't even think about that! I was thinking that it was just a z-index issue. But what if the text that you are replacing is in the first 2 lines of the code which are covered up? I think that ideally we would shift the content down but that might be difficult to do given the hierarchy of the components.

The Editor would need to know that the find/replace modal is open. So we would need to pass around a lot of state. Well...actually...I think we can tell if the modal is open by looking at the internal state of the CodeMirror instance this._cm. But I would have to dig into the docs to figure out how to do that.

It would definitely be an improvement just to fix the z-index. So maybe we start with that, and revisit layout changes later?

@mrkirthi-24
Copy link
Author

It would definitely be an improvement just to fix the z-index. So maybe we start with that, and revisit layout changes later?

Great I will push the z-index changes for now

@lindapaiste
Copy link
Collaborator

The z-index issue was fixed by #3037.

I'm going to keep this issue open as we did not implement pushing down the editor to keep the top lines visible. But I'm editing the tags because the bug part is fixed, and what remains is a more complicated feature request involving CodeMirror code.

@lindapaiste lindapaiste added Enhancement Area:Editor For CodeMirror-related features and removed Bug Area:CSS labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Editor For CodeMirror-related features Enhancement
Projects
None yet
2 participants