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

Cell-level errors #1280

Merged
merged 14 commits into from
Apr 15, 2022
Merged

Cell-level errors #1280

merged 14 commits into from
Apr 15, 2022

Conversation

seancolsen
Copy link
Contributor

@seancolsen seancolsen commented Apr 12, 2022

Fixes #1045

Works towards #775

Demos

Issues

  • Cell background when row is hovered or selected or newly-added takes precedence over cell background as determined from edits. Before making further adjustments to this behavior, I'd ideally like to get some input from @ghislaineguerin on how cell background should work. We're using background color to communicate a lot of things at once. I've started Cell background color #1282 for further discussion.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the master branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

This reduces the need for type assertions, making our code more
type-safe and succinct.
This is better because `RequestStatus` stores errors too. If a request
has not yet been made (e.g. the 'idle' `State` value), then there will
no RequestStatus, i.e. `undefined`.
- Allow iterables in constructor.
- Allow removing by array.
- Allow a function to merge values of a map when adding.
Changes applied to package-lock.json when restarting docker.
@seancolsen seancolsen marked this pull request as ready for review April 12, 2022 21:31
@seancolsen seancolsen requested review from a team, pavish and dmos62 April 12, 2022 21:31
@seancolsen seancolsen added the pr-status: review A PR awaiting review label Apr 12, 2022
@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2022

Codecov Report

Merging #1280 (11900e7) into master (a9d7d26) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1280   +/-   ##
=======================================
  Coverage   93.46%   93.46%           
=======================================
  Files         114      114           
  Lines        4404     4404           
=======================================
  Hits         4116     4116           
  Misses        288      288           
Flag Coverage Δ
pytest-backend 93.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9d7d26...11900e7. Read the comment docs.

@seancolsen
Copy link
Contributor Author

I don't understand why this E2E test is failing. It seems to be timing out.

locator_assertions.to_be_visible with timeout 5000ms

The listed timeout is not what I'd expect. It should be 30000ms because we have overridden the page fixture.

@silentninja any ideas here?

@seancolsen
Copy link
Contributor Author

Note: I merged changes from #1286 (which is set for auto-merge into master) into this PR in an attempt to get the CI to pass.

@pavish pavish added pr-status: revision A PR awaiting follow-up work from its author after review and removed pr-status: review A PR awaiting review labels Apr 14, 2022
@pavish pavish assigned seancolsen and unassigned pavish Apr 14, 2022
Copy link
Member

@pavish pavish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seancolsen The PR looks good. I noticed a couple regressions we need to fix before merging this in:

  • Skeleton does not show when there is a sheet level loading action - initial load, refresh, pagination, applying sorting etc., It should be visible in these scenarios.
  • Skeleton shows during a cell update. It should not be visible during this scenario.

We can figure out cell background behavior later.

@seancolsen
Copy link
Contributor Author

seancolsen commented Apr 14, 2022

@pavish I've added 11900e7 which should address your feedback. Ready for re-review now.

@seancolsen seancolsen removed the pr-status: revision A PR awaiting follow-up work from its author after review label Apr 14, 2022
@seancolsen seancolsen added the pr-status: review A PR awaiting review label Apr 14, 2022
@seancolsen seancolsen assigned pavish and unassigned seancolsen Apr 14, 2022
Copy link
Member

@pavish pavish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seancolsen Nice work on this!

I do see another regression:

  • When rows are deleted, we re-fetch data for the entire page.
  • The skeleton indication is now shown for the entire sheet for this. It should not be shown.

I'm going to merge this in. I'll add a separate issue for this.

@pavish pavish merged commit 707e062 into master Apr 15, 2022
@pavish pavish deleted the cell_level_errors branch April 15, 2022 07:55
@pavish
Copy link
Member

pavish commented Apr 15, 2022

Created #1289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: review A PR awaiting review
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Gracefully handle new API error structure in toast messages
3 participants