-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
Adding records #671
Adding records #671
Conversation
49117ff
to
7b5f21b
Compare
7b5f21b
to
1cee81e
Compare
… and reloaded in-place
@kgodey @ghislaineguerin This PR is ready for review again. Short video describing the changes: Google Chrome - Mathesar - Home - Watch Video I'll create a design issue for the specifications/detailing required, as mentioned in previous comment. |
I played around with this locally and it looks good. Thanks for the video as well @pavish. We can open new issues if any bugs arise. I'll leave it to @seancolsen to approve and merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review process (listed here since I'm new):
-
I skimmed the diff and did not identify any red flags at the code-level. Privately, I took note of some general questions about the code to ask Pavish on our next call, but I don't yet know the codebase deeply enough to spot any issues with the diff.
-
I ran this PR locally and found a few things to suggest, listed below.
Suggested changes, highest priority first
-
Use a better name for the button instead of "Record".
I suggest "New row", but I think "Add row", "Add record", "New record", and "Insert" would also be fine. (I like "New row" best because it's consistent with preexisting buttons for "New table" and "New Schema".)
Rationale: As-is, we're relying on the plus icon to convey functionality, which is poor accessibility. Without the icon, the functionality of a "Record" button is not clear to the user, especially because "Record" can be a verb too.
-
Fix bug when deleting a record near the end of the table while adding a new record:
To reproduce:
- Import
patents.csv
. - Go to page 3.
- Click "+ Record".
- Select another row (e.g. 1390).
- Click "Delete 1 records"
- Expect to see either 1 green row at the bottom (persisting from our process of adding the new row) or 0 green rows at the bottom (because the table has been refreshed after deleting a row).
- Observe 2 green rows at the bottom in duplicate.
- Import
-
Initiate adding when clicking on the "+" icon at the bottom of the table (within the row number column). I can click within other areas of that bottom row, but not on the icon itself, which is the spot I think users are most likely to click.
@seancolsen Regarding,
This was followed based on our UX designs. I think we can add this to #722, so that @ghislaineguerin can decide on this.
I am aware of this bug, I've mentioned it on the follow up design issue (#722), and also on the latest video. I've not handled it because it requires a bit of UX rethought. I do agree we need to handle duplicates, however delete is an operation which reloads the table in-place without additional user intervention. This is different from other reloads like moving across pages, sorting etc., which require explicit user action. So, we cannot clear up the newly added records from the view during delete. We will need to think on the best way to handle this. @ghislaineguerin Let us know if require further input from us. I've already added it as a point on the design issue, I'll also add @seancolsen's comment in the issue. I think it would also make sense to have a dedicated issue for this.
Good point. I'll update the PR to handle this. |
The Add Record button name seems like a small enough issue that we can handle it here, @ghislaineguerin can you take a quick look at the discussion? |
@pavish Regarding @seancolsen comment on 'Add Record.' I agree with his points. I think we should use 'Add Row' as he suggests because when using this button from a view, we might have multiple records being added within the same row. I will update the design accordingly. |
This may be splitting hairs, but just to clarify... I think "Row" and "Record" are both acceptable words to use within the button. The change I'm requesting is that we add a verb like "New", "Add", or "Insert" before the noun. Any of those three verbs seem good to me, but "New" seems best because it's consistent with the buttons we already have for "New table" and "New Schema". And, in choosing between "Row" and "Record", I like "Row" because it's more concise. That's how I arrived at the suggestion of "New row". |
@seancolsen I see, I was just thinking about 'row' as I hadn't considered the action for adding within a view, and I think it makes more sense. As for the verb, maybe 'Insert' is better as it doesn't imply new or existing and would match our various scenarios. |
I think we probably want different words for tables and views. I like using "Record" for tables because the user can learn that tables contain a single record whereas views might have multiple records in a single row. I like "New" or "Add" better than "Insert", it's shorter. We will be doing another design/UX pass on the toolbar and general styling before we ship the alpha release, so I think we should just go with something for now. I suggest "New Record" or "Add Record". @ghislaineguerin what do you think? |
@kgodey ok, we might have to think about how we refer to the action in the context of views. But give that we'll rework most of it when designing the toolbar I think it's fine to have 'New Record' for now. |
This is a great point. Seconded. |
Sounds good. I'll update the PR with 'New Record' for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Fixes #197
Task list
Demo
Mathesar - adding a record - Watch Video
Note
Checklist
Update index.md
).master
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin