TobikoData / sqlmesh

Efficient data transformation and modeling framework that is backwards compatible with dbt.
https://sqlmesh.com
Apache License 2.0
1.51k stars 125 forks source link

Browser UI (IDE) needs a Save button for saving file edits #2718

Open jmarch opened 1 month ago

jmarch commented 1 month ago

It seems the only way to save a file that is opened in a tab in the IDE is to use common OS keystrokes, like Command-S (on mac).

I believe the expected user experience is to have a Save button (too).

mykalmax commented 1 month ago

I think most major IDEs do not have an explicit save button (it may be hidden under File or somewhere else).

jmarch commented 1 month ago

I agree with you for more advanced, cloud-based editors that offer google-doc-like functionality (auto-saving, concurrent/collaborative editing, revision history, reversion, etc).

My company went that direction when building a very similar SQL modeling IDE, but we had to strictly separate the underlying "live" (filesystem and git-managed) codebase from the collaborative editing shared workspace. It wasn't easy (read: more moving parts), but we loved the final outcome. Saving was auto, but not to the filesystem. Test and Deploy were the actions. When hosted in the cloud, we could watch our customers making (or struggling to make) live edits to their data models. Also, data team members could work together to refine and debug without overwriting each other.

Maybe that's not even the SQLMesh IDE direction, as it seems far off from where it is today as an IDE working against a live SQLMesh filesystem folder. It feels to me like a Save button (or menu item) makes saving config/code an obvious "commit" and easier for the end user to reason about... especially after they might have been tweaking a model for a long period of time (most of which might have been spent in an inconsistent state). The lack of a button sort of suggests that Saving is not my concern... like "Is this file being auto-saved?"

Anyway, happy to chat more about any of this. I filed the ticket cause it seems to me like without the above mentioned features, your best short-term bet is for the IDE to be thought of as providing a local scratch space where Saving is much more explicit (like a code commit). And, if the file has changed from under me, you have a chance to warn.

Getting long-winded here (and off topic for this issue), but since "commit" has been mentioned... I'd love to hear how all this is intended to work with people working independently outside the IDE using other editors (and git).

HTH. :)