Skip to content
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

table group option in the table menu #278

Merged
merged 9 commits into from
Jan 26, 2023

Conversation

sinisaos
Copy link
Member

Related to this disussion. Changed Playwright tests as page.locator API changed in v1.27.0.

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2023

Codecov Report

Merging #278 (b6acada) into master (5924c4e) will decrease coverage by 0.31%.
The diff coverage is 93.75%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
- Coverage   93.57%   93.27%   -0.31%     
==========================================
  Files           5        5              
  Lines         327      342      +15     
==========================================
+ Hits          306      319      +13     
- Misses         21       23       +2     
Impacted Files Coverage Δ
piccolo_admin/endpoints.py 92.55% <93.75%> (-0.31%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sumitsharansatsangi
Copy link

Thanks @sinisaos for the PR.
@dantownsend , All checks have passed. Can you please merge it, if it is good to go ?

@dantownsend
Copy link
Member

dantownsend commented Jan 25, 2023

@sumitsharansatsangi I think it's almost there.

@sinisaos It's looking good. One thing I spotted is the two tables at the bottom look like they belong to the same group, but they don't - the bottom most one doesn't have a group.

Screenshot 2023-01-25 at 22 30 38

There's a couple of solutions:

  1. The ones without a group should go at the top.
  2. We visually distinguish them more - for example, make the background darker if it's in a group.

I'll have a play around.

@sumitsharansatsangi
Copy link

sumitsharansatsangi commented Jan 26, 2023

@sinisaos , Two things I want to suggest are as follows:-
- to make the group collapsible, like the Tables header
- to give a slightly differentiating color to the group header, although the icon is differentiating but different color with different icon would be more appealing
@dantownsend , I think your second solution (i.e. We visually distinguish them more - for example, make the background darker if it's in a group.) is more appropriate. As per it is the matter of which type of table should be at the top either grouped table or ungrouped table , it will be better just provide a parameter in the create_admin like as follows and display the tables accordingly.

create_admin(
group_first=True
...
)

Thank you.

@dantownsend
Copy link
Member

I had a play around with it.

I made it so any tables without a group go at the top.

It's all sorted alphabetically now - first by group name, then table name.

@sinisaos What you did was really good. The changes I made were basically just sorting the sidebar. I styled the group name slightly differently to make it easier to differentiate. What do you think?

Screenshot 2023-01-26 at 11 39 29

@dantownsend
Copy link
Member

I've made the groups collapsible. If you're both happy with this, I'll release it and we can always improve upon it in future PRs.

Copy link
Member Author

@sinisaos sinisaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dantownsend This is awesome, looks much better than before.

@dantownsend
Copy link
Member

@sinisaos Thanks, will merge it in.

@dantownsend dantownsend merged commit 945e9d6 into piccolo-orm:master Jan 26, 2023
@sinisaos sinisaos deleted the table_groups_in_menu branch January 26, 2023 14:25
@sumitsharansatsangi
Copy link

sumitsharansatsangi commented Jan 26, 2023

@dantownsend , please release it (One more awesome contribution of @sinisaos and yours).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants