-
Notifications
You must be signed in to change notification settings - Fork 200
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
Show icons in Schema Editor, fix #955 #970
Conversation
@@ -287,17 +287,67 @@ renderObjectSelector statements activeObjectName = [hsx| | |||
|] | |||
where | |||
contextMenuId = "context-menu-" <> tshow id | |||
renderObject Comment {} id = mempty |
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.
Why have these empty statements been removed? The idea was that we hide all the statements that the user cannot interact with from the GUI
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 train of thought was: icons look nice -> oh, we only show tables and enums -> let's show more (all) to see more pretty icons
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.
I agree, but in big project's this really wastes a huge amount of screen space (I've tested it)
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.
We could sort the entries by type (e.g. tables, types, indexes), add a sub-header and by default collapse everything except tables. That's also how pgadmin and dbeaver work.
(FWIW, I'm also fine with simply hiding everything except tables, types and indexes)
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.
This is all too complicated for things that cannot be used from the Schema Designer. Let's keep the behaviour from master and hide everything which cannot be interacted with
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.
Thanks :) Good job
This fixes #955 and adds some icons from the pgadmin4 project to the schema editor:
I originally added some code to order the DDL statements, e.g. first tables, then indices, then enums etc. But I removed that change since I usually have my DDL statements in an order that makes sense to me (regarding ordering, also have a look at #584). That's also why I changed the code to include comments as well. Thoughs?