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

rolling-stock-editor: first character disappears when inputing in table #4670

Open
celine-sncf opened this issue Jul 26, 2023 · 7 comments
Open
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:enhancement Improvement of existing features module:rollingstocks-editor A module dedicated to rollingstock editors postponed Postponed task due to other priorities or waiting for dependencies severity:minor Minor severity bug

Comments

@celine-sncf
Copy link

What happened?

When trying to add a value in the "Vitesse / Effort" table of the rolling stock editor, the first character inputed disappears

What did you expect to happen?

No response

How can we reproduce it (as minimally and precisely as possible)?

  1. go to rolling stock editor

  2. click on "new rolling stock"

  3. scroll down to the table & curve

  4. enter any value in the table
    image

  5. watch the first character of your input disappear

What operating system, browser and environment are you using?

  • Browser: Firefox
  • OS: win10
  • Env: dev

OSRD version (top right corner Account button > Informations)

8a7ba0c

@celine-sncf celine-sncf added kind:bug Something isn't working area:front Work on Standard OSRD Interface modules severity:major Major severity bug module:rollingstocks-editor A module dedicated to rollingstock editors labels Jul 26, 2023
@celine-sncf
Copy link
Author

works in Chrome, specific to Firefox ?

@axrolld axrolld added the difficulty:good first issue Good for newcomers label Nov 2, 2023
@kmer2016 kmer2016 self-assigned this Nov 8, 2023
@nicolaswurtz
Copy link
Contributor

nicolaswurtz commented Nov 10, 2023

Specific to firefox and specific to the used library, cf iddan/react-spreadsheet#192
A solution is proposed but with no PR, could someone contribute to React Spreadsheet to do the PR ? When merged, updating the library should be enough to resolve the bug.

@flomonster
Copy link
Contributor

I can't reproduce this bug (on Firefox). I do have the focus issue described here (#5307) though. Can we close this issue and report @nicolaswurtz comment to issue #5307?

@celine-sncf
Copy link
Author

I can still reproduce today.
What happens more specifically is that:

  • I click once on the table, the cell is selected but pointer is still a square cross (pointer A)
  • I input the first character (that can be a number from the numpad) or I click a second time on the cell (as described in Double click is necessary to enter value in rolling stock editor #5307 ) : the pointer changes (pointer C), the cell is highlighted + a flashing | indicates that I can start typing

image

@Yohh Yohh removed the difficulty:good first issue Good for newcomers label Nov 21, 2023
@Yohh Yohh self-assigned this Nov 21, 2023
@Yohh
Copy link
Contributor

Yohh commented Nov 22, 2023

each "input" in the spreadsheet render a component, the first state of this component is a "view" mode, the second is an "edit" mode, at first click we are in view mode and it allows us to select multiple cells, when clicking another time in the same cell we enter in edit mode then we can add a value.

i've find a way to force the cell's mode to "edit", but this mode is readonly.

I'm gonna try to figure out if setting this mode not readonly is a solution with the author of the lib.

@Yohh
Copy link
Contributor

Yohh commented Nov 24, 2023

conclusion (for now):

this behavior is due to SpreadSheet, we can create custom cells to give to it the behavior that we want, but we will have other issues:

  • impossible to select multiple cells
  • impossible to copy/paste from cells
  • impossible to paste the content of an excel file in the SpreadSheet, which was a priority of the feature

we can add more logic to retrieve thoses behaviors but in the end SpreadSheet will be totally useless and this "bug" resolution will turn to a new feature enhancement, with a lot of work.

In fact this bug seems to be not major at all, we just have to click one time to select the cell, then a second time to edit the cell, as provided by the lib

due to the lot of work this bug is postponed

@Yohh Yohh added postponed Postponed task due to other priorities or waiting for dependencies severity:major Major severity bug and removed severity:major Major severity bug labels Nov 24, 2023
@nicolaswurtz nicolaswurtz added severity:minor Minor severity bug kind:enhancement Improvement of existing features and removed severity:major Major severity bug kind:bug Something isn't working labels Jan 23, 2024
@nicolaswurtz
Copy link
Contributor

Hi! We triaged this demand to PM Team board: it's not exactly a bug — not a bug in our code — so we've to decide what to do and how to do it.
@Yohh posted a question in original library without response for now, so we'll wait (or change/fork/use another library).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules kind:enhancement Improvement of existing features module:rollingstocks-editor A module dedicated to rollingstock editors postponed Postponed task due to other priorities or waiting for dependencies severity:minor Minor severity bug
Projects
None yet
Development

No branches or pull requests

6 participants