-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Editing Linked Records #3242
Comments
@ghislaineguerin I don't think this ticket requires any design work because I think the design for this is straightforward enough. We'd have a context menu option on FK cells titled "Edit Linked Record". It would open a modal containing the form that we current display at the top of the record page. Unless you have other design considerations to work on, I suggest moving forward with this design by changing the "work" label on this ticket from "design" to "frontend" and changing the "status" label from "draft" to "ready". |
@seancolsen I did had some considerations for the design of this functionality. Currently, when you click on a linked record, it offers the option to replace it. This replacement can be with a new or an existing record. However, this new record isn't created through a form; instead, the search criteria are used to locate the record. I believe that if we were to incorporate a form, the user should be able to access it directly from the cell by clicking on the record badge, rather than through the contextual menu. I aim to prioritize this workflow as it likely occurs more frequently than replacing a record with a new one. Additionally, I want to provide users with a direct way to use the form to add a new record from the record selector when a search hasn't been performed yet. It could be as simple as clicking directly in the cell to initiate the process of creating a new record. For these reasons, I have contemplated a change at the cell level with three different states:
For Option 2, the user would need to delete the existing link before pressing the link button to add a new one. Option 3 allows the user to access the record form directly from the cell. |
@ghislaineguerin I'm confused by the cell having "three different states" your message above. To me this seems very simple.
Does my proposal make sense? Does this sound good? If so, this will be very easy to implement. |
Thanks @seancolsen. I agree that it is easier to implement. My point was to prioritize access to the form, from clicking on the record element instead of opening record selector. That's why I proposed a different set of interactions. I believe that will be a more frequent interaction than replacing records. If you think we can discuss that in a future iteration then I'm fine with implementing the form as you've described for now. If not I'd like to know what your position is on prioritizing replace vs. edit. |
Types of editsWe are discussing two kinds of editing:
You seem to be suggesting that (B) will be more common than (A). I think (A) will be more common than (B), but it's hard to know for sure. It might be interesting to get some other team members to weigh in on this prediction and see whether they prefer your design which encourages (B) or my design which encourages (A). @pavish @kgodey would you care to voice an opinion here? Ghislaine's proposal@ghislaineguerin I understand that you'd like to prioritize (B), but the precise behavior that you're proposing is not clear to me. Let me take a stab at summarizing it to see if I understand:
I'm still not clear on the behavior that you'd prefer when clicking in empty white space within a non-null FK cell. And I'm still confused by the "three different states" you mention. In one part of your message you refer to them as "states", but then later you seem to be calling them "options". I don't understand. I'm also confused by the fact that your mockup has a Overall, I'm open to a design heading this direction, but I have a slight preference for my design and I want to make sure we think through the consequences and get some other opinions. Existing patternsI wanted to see what other products are doing, especially since it may inform user's expectations of what Mathesar might do.
Preventing mistakesHere's another angle to consider as we weigh our various design options: how can we prevent unintended actions? Specifically...
My design requires an additional step to do (B) — opening the context menu. To me, that additional step serves to represent the indirection present at the database layer. You need to sort tof "jump through a small hoop" in order to edit a record in a different table from the one you're currently viewing, and I think that hoop is a helpful way to give users a clear understanding of relational database principles. To reiterate: I'm open to Ghislaine's design (following Airtable's pattern) but I want to think through ways that can adjust the UI in order to give users an accurate understanding of their actions. |
@seancolsen yes, what I’m proposing is a design similar to Airtable's. The reason is that it allows not only for editing but also for a quick overview of all the contents in that linked record with a single click. This would enable a wider range of workflows than just changing the FK cell's value, something that can be done directly when the cell is empty. I also like that with this design, all actions can be done without relying on the contextual menu. It's usually good practice to provide users with alternative ways of performing actions available in contextual menus. I'm assuming that if we go with your option we'd add a button somewhere in the inspector panel for this purpose. |
Very good point! I like that! I'm open to going with your design. I'd like to see what others think. The change you're proposing would be more work to implement than mine. Some follow-up questions to clarify your design...
|
@ghislaineguerin @seancolsen This issue currently focuses only editing the linked record. However, the suggested UX modifies existing behaviour and needs to take the entire FK cell behaviour into account, before we can proceed with it. As Sean has already pointed out, there are a number of things to take into consideration here. Ghislaine said:
Sean responded:
My thoughts: While I think (A) would be more common, I also think that any opinion on this would depend on individual usecases and it's hard to say for sure. I agree with Ghislaine's concerns on providing a quick overview of all the contents in that linked record and allowing editing it. However, I don't think it should come with the cost of replacing records. I would encourage trying to find a solution that does not prefer one over the other and rethink the entire FK cell behaviour from a holistic perspective. We may want to do more research before coming to a conclusion on the UX. For eg., We can show the form in the Table inspector, and we could add keyboard shortcuts and additional icons in the cell, to open up the form or the selector, as the user prefers. |
I'm with @pavish. I don't think it's possible for us to make a determination on whether (A) or (B) is more common – my personal inclination is (B), FWIW. I think the solution is to to make both things easy, even if that means a more holistic UX overhaul (on both the table page and the record page). |
We'd have an option to "replace record" in both the contextual menu and cell panel in the inspector.
I think we'd get rid of the downward-facing chevron.
From the record page, we'd still open the edit modal. The edit modal should have an option to go to the record page for that record if the user wants to. The same should apply to the table view. There should also be a contextual menu in both cases. |
@ghislaineguerin How will the UX you've outlined above work with keyboard based navigation? |
To put @kgodey's question into context with the above graphic, I think we have the following more specific open questions:
My responses:
|
Thanks for your responses, @ghislaineguerin. I'm on board with moving in this direction. A added benefit of this design is that it brings the linked record cell into perfect consistency with the linked record input (which is not currently the case). |
@kgodey @seancolsen I've only responded to questions posted here. But I'm working on a full spec: https://hackmd.io/A3SJ887MRtC_YYZfGMwvpA |
Description
Currently, users can't edit the properties of a linked record directly from the table view. To make any changes, they have to navigate to the specific record in the other table. We need a more efficient way to interact with these linked records without leaving the main table view.
Expected behavior
Users should be able to click on a linked record within the table view and edit its properties in a popup or inline editor. Changes should be saved and reflected immediately both in the linked record and the main table view.
Design Spec
https://hackmd.io/@mathesar/ry3ce4D86?type=view
The text was updated successfully, but these errors were encountered: