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

Switching a schema from the Manage Schema #1191

Merged
merged 15 commits into from
Mar 25, 2022
Merged

Switching a schema from the Manage Schema #1191

merged 15 commits into from
Mar 25, 2022

Conversation

A1O
Copy link
Contributor

@A1O A1O commented Mar 17, 2022

Fixes #985

Technical details

As described in the issue #985 description:

  • The clicked schema becomes the currentShema
  • Redirects to the main page once the currentSchema is updated

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.

@A1O A1O requested review from a team and seancolsen March 17, 2022 14:47
@pavish pavish added the pr-status: review A PR awaiting review label Mar 18, 2022
@pavish pavish assigned pavish and unassigned seancolsen Mar 18, 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.

@A1O Thanks for the PR! I have a comment, once resolved, we could merge this in.

mathesar_ui/src/pages/schemas/schema-row/SchemaRow.svelte Outdated Show resolved Hide resolved
@pavish pavish assigned A1O and unassigned pavish Mar 18, 2022
@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 Mar 18, 2022
@A1O
Copy link
Contributor Author

A1O commented Mar 19, 2022

Do I need to add a unit test?

@A1O A1O requested a review from pavish March 21, 2022 11:50
@kgodey kgodey assigned pavish and unassigned A1O Mar 22, 2022
@kgodey kgodey added pr-status: review A PR awaiting review and removed pr-status: revision A PR awaiting follow-up work from its author after review labels Mar 22, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2022

Codecov Report

Merging #1191 (52afbc8) into master (b94bfa8) will not change coverage.
The diff coverage is n/a.

❗ Current head 52afbc8 differs from pull request most recent head 1b2604b. Consider uploading reports for the commit 1b2604b to get more accurate results

@@           Coverage Diff           @@
##           master    #1191   +/-   ##
=======================================
  Coverage   93.41%   93.41%           
=======================================
  Files         113      113           
  Lines        4341     4341           
=======================================
  Hits         4055     4055           
  Misses        286      286           
Flag Coverage Δ
pytest-backend 93.41% <ø> (ø)

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 444d1e6...1b2604b. Read the comment docs.

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.

@A1O I'm re-evaluating the requirement, since having an anchor as the parent of the SchemaRow component poses other issues.

  1. This leads to cases where we have to check if there is a closest button or another anchor, as you've done. There's no better way around this. Any other way of trying to achieve this will still end up as a workaround.
  2. We'll also have to handle keydown events separetely.

We cannot get rid of the anchor because we need it for better accessibility.

I understand the issue is specced to handle click on the entire row, but I think we would be better off making only the name of the schema as an anchor.

Could you please revert these changes and modify SchemaRow and only update the schema name to be an anchor tag?

@pavish pavish assigned A1O and unassigned pavish Mar 24, 2022
@pavish pavish removed the pr-status: review A PR awaiting review label Mar 24, 2022
@pavish pavish added the pr-status: revision A PR awaiting follow-up work from its author after review label Mar 24, 2022
@A1O
Copy link
Contributor Author

A1O commented Mar 24, 2022

@pavish Yes, no problem. I have made the changes you requested.

@A1O A1O requested a review from pavish March 24, 2022 23:28
@kgodey kgodey assigned pavish and unassigned A1O Mar 24, 2022
@kgodey kgodey added pr-status: review A PR awaiting review and removed pr-status: revision A PR awaiting follow-up work from its author after review labels Mar 24, 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.

@A1O Looks good! Thanks for your work on this PR.

I added a small commit 52afbc8 to improve the style to indicate that the name is a link.

@pavish pavish merged commit cf1b91c into mathesar-foundation:master Mar 25, 2022
@A1O
Copy link
Contributor Author

A1O commented Mar 25, 2022

@A1O Looks good! Thanks for your work on this PR.

I added a small commit 52afbc8 to improve the style to indicate that the name is a link.

@pavish On the design side, it looks a little strange. But I understand the reasons for this decision.

@A1O A1O deleted the 985-switch-schema-from-manage-schema branch March 25, 2022 10:29
@pavish
Copy link
Member

pavish commented Mar 25, 2022

@A1O We have a dedicated milestone to improve the visual aspect of the design, where we intend to go through the entire product and improve design in general (UX + UI). While working on features, the priority is to focus more on the user experience side of the design.

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.

Clicking on the name in 'Manage Schemas' page should set is as the current schema and redirect to base page
5 participants