-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Form Screen Templates Generate Relevant Row Ids, Permission Roles are Automatically Generated #14192
Conversation
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.
Yo @Ghrehh! Overall a really great addition 🎉 It definitely feels more streamlined creating screens now.
Some minor comments in the review and a couple bugs I ran into during testing.
BUG
Error previewing newly created View/Update screens from External Table/View- Get the following notification
invalid input syntax for type smallint: " :id "
- This was from a Postgres external integration.
- This doesn't occur in prod for internal or external.
- The default builder behaviour is to load the first record, the preview should reflect that
- Get the following notification
BUG
caching view permissions- Inherited Permissions used to generate view screens don't update when the parent table access is updated.
- Custom view access permissions also don't seem to have any impact on the screen generated, in this state.
- Create a table and set the following access permissions
- Read/POWER, Write/PUBLIC
- Create a view and leave it unchanged. It will inherit the above.
- Generate a screen from the new view and it will have permissions that reflect the parent table.
- Read/POWER, Write/PUBLIC
- Alter the permissions of the parent table to something completely different
- e.g Read/BASIC, Write/POWER
- Generate a new screen from the same view without touching permissions.
- It will generate a screen reflecting the parent tables original permissions.
- Altering the custom permissions of the view doesn't have any effect.
Notes
- while debugging the permissions issue above I thought it would be nice to give the user an impression of what the computed screen permission would be before they create it. We used to prompt them with the default, now we set it for them and don't indicate it to them. Below is a PoC:
@@ -33,6 +33,5 @@ | |||
title="Confirm Deletion" | |||
> | |||
Are you sure you wish to delete the datasource | |||
<i>{datasource.name}?</i> | |||
This action cannot be undone. | |||
<i>{datasource.name}</i>? This action cannot be undone. |
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.
NAB: We should probably reflect the same confirmation UX here as we do for tables within datasources. This is obviously a much scarier thing to do.
Also, I realise you didn't write this, but it might be nice to add here 👍
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.
Could you explain this again please? I'm not sure I follow 😆
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.
No worries. I just noticed that when running through the PR, when you go to delete an entire datasource from BB, we don't provide the same confirmation mechanism as we do for a table within a datasource. For tables, we provide a text prompt and require the user to enter the exact table name before enabling the delete button.
When deleting my entire PostgreSQL source, I only get this:
Utterly outside the scope of the ticket though. Safe to ignore and I'll just raise a ticket for it 👍
...es/builder/src/components/backend/TableNavigator/TableNavItem/DeleteConfirmationModal.svelte
Show resolved
Hide resolved
...er/src/pages/builder/app/[application]/design/_components/NewScreen/CreateScreenModal.svelte
Outdated
Show resolved
Hide resolved
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.
Really nice work Gerard! Ran through this and everything worked as expected. I like that you've accounted for small details like not adding nav links for edit/view forms etc 👌
Please feel free to give me a ping if you're doing new features like adding the read/write permissions in to the datasource modal - I'd always want to weigh in with opinions from a product/design perspective for unspecced changes 👍 Obviously with Ben on board now he can be pulled into these sorts of conversations too, since they have a visual impact.
But great job and I couldn't find any issues here at all.
@deanhannigan Ty for the thorough review, responses and changes below, if you could review this again when you get a chance I'd appreciate it:
I think this is happening on master currently and isn't to do with my changes
I think a lot, if not all, of the stuff you're mentioning here is caused by the fact that the original implementation of this just fetched definitions once and didn't bother to refetch them. I thought this would be okay to begin with, but I think it's a mistake now. I've changed this so that the caching takes place at the component level, and unselecting a datasource and reselecting it will refetch the role data. Opening and closing the screen creation modal will blow away all cached values entirely also.
I also implemented this! But It's a little more complicated because both read and write access levels need to be exposed to the user, I'll include a screenshot and a full change log below. NOTE: Upon talking with Cheeks I think we might actually remove this, as the original intention of this automatic role assignment change was to make it so users didn't need to consider screen roles as much, and displaying them even subtly kind of goes against this philosophy. I'll leave it in this PR for now just to get it over the line with minimal changes, but will remove it in #14203 which is branched off this. Changes
|
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.
LGTM! I ran through everything this morning and the changes are looking great! I had a chat with @aptkingston this morning about the preview issue on master and I'm going to raise a ticket for it.
I love the permissions indicators on the datasource picker! I do see now how this conflicts with the intended design philosophy though 👍
ticket
Main Changes
resource/view/:id
. Previously they did not, which meant they weren't super useful out of the box.Other Changes
CreateScreenModal
component. Its logic was a little confusing in my opinion, and it also had a lot of code that seemed to be holdovers of previous features.Table Delete Modal
This PR also contains some changes for the Table Delete Warning modal.
Previously this modal would delete any screens generated with the table when the table was deleted, this seems a little extreme given that the screen may contain other data, or may not even contain the originally generated content at all. There was also no way to remove this tagging as far as I can tell, so a screen was stuck with it forever.
It also was inconsistently applied, and screens generated from form templates weren't marked in the same way.
Now this modal will simply warn the user that a screen was generated from this datasource initially, and that it may be affected by table deletion. This behaviour is also consistently applied across table and form templates.
Other Changes