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

mismatched spreadsheet cell types "red" #3001

Closed
saracarl opened this issue Feb 14, 2022 · 3 comments · Fixed by #4052
Closed

mismatched spreadsheet cell types "red" #3001

saracarl opened this issue Feb 14, 2022 · 3 comments · Fixed by #4052

Comments

@saracarl
Copy link
Collaborator

Dates or numbers in spreadsheet transcription that don't match what is expected by hands on table have a red background applied. This is off putting to transcribers, who are probably encountering a real anomaly in the text they are transcribing.

Let's make it yellow.

@benwbrum
Copy link
Owner

This will require overriding the stylesheets we import from HandsOnTable.

@benwbrum
Copy link
Owner

There are two problems with the current HandsOnTable validation:

  • Cells with data which does not conform (i.e. non-numeric data in numeric cells) are displayed as red, rather than orange or yellow
  • Cells are colored only when the data has been entered by a user and not saved. If a user edits a form with non-compliant data, we do not color the relevant cells.

We'd like to address both of these.

@atbah
Copy link
Collaborator

atbah commented Apr 23, 2024

@benwbrum To fix this issue, please follow the below steps.
Go to this file => app/views/shared/_handsontable.html.erb, and add these code

<style>
  .handsontable td.htInvalid {
    background-color: yellow !important;
  }
</style>

image

// validation for initial data
  hot.validateCells()

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants