-
Notifications
You must be signed in to change notification settings - Fork 173
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
feat: Add an option Share Readonly, Allow Duplicate (for content creators / marketing) #2252
Comments
Also need to add "Duplicate" option under File menu in nav - this wasn't available for me within https://app.quadratichq.com/file/963b34fa-bee9-4e72-95f3-2386351ef28e |
Last we discussed, where we landed was: If you can access a file, you can duplicate it. So even if a file is in a team you don't belong to but it's been shared with you (via an invite or a link), then a "Duplicate" option will be available in the UI (both under "File -> Duplicate", command palette, and the widget described above in the PR description) The big question was what happens to connections in shared files (if there are any)? We decided that they just won't work. You'll be able to see the data from the connection, but when you open the code editor you can't re-run it (and you can't see the schema, etc). I believe most of this should just work given our current permissions setup, but it's just a matter of diving in and starting to build it and seeing if everything works as expected. |
@jimniels I think the connection would just fail. We don't store secrets in the file, so no security implications. Currently, a user can download a readonly file and import, so duplicate just makes this simpler with the same set of possible issues. |
Noting my thoughts down as I explore this: Supporting this in the UI is really simple. Change a permission, add a button, and it's basically done (you'd see a UI like this). The problem is that the API doesn't have a notion of "duplicating" a file. Right now "duplicating" a file is done on the client, so the client has to do steps like:
And we don't have a bullet-proof method on the client for determining (from the spreadsheet-side of the app) what the user's current team is. We might have it in localstorage. We probably will, most of the time, but it's possible we don't. And we don't represent on the spreadsheet side of the app which teams you have access to. So when you say "Duplicate", what you mean is "Duplicate it to the team I'm currently in". Because if you have access to more than one team, how do you know where you're duplicating it to? Team A or Team B? There's no UI-facing notion of which team you're "in" from the spreadsheet. So we could just guess and assume that most of the time it's gonna duplicate to the right spot. But for users with more than one team, it might duplicate to the wrong team. Also: if you've never created an account, there's an edge case here too where maybe you came to the app because of a shared file, created an account, then went back to the shared file and we haven't yet determined a "team" for you (I'm not sure of the details here...) Probably the best way to do this is check for the presence of the "activeTeam" in local storage and, if it's present, show a "duplicate" button. If we don't have that, just don't show the button (will probably rarely happen, but covers the edge cases) |
Almost wondering if, perhaps, this notion of an "active team" should make its way into both the app and the dashboard. So when you go upper left in the sheet-side of the app, you would see the "team logo" implying that "Back to dashboard" means "Back to dashboard of Team B" And then we'd have to figured out how to best represent the brand (if at all) in this experience. |
Scope:
The text was updated successfully, but these errors were encountered: