这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@pthm
Copy link
Contributor

@pthm pthm commented Dec 12, 2018

Description

What component does this PR affect?

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Requires changes from other components? If yes, please mark the components:

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Related Issue

No related issue

Solution and Design

Small change to sort table names alphabetically in the Schema/Table selection section of the add trigger screen. Currently its not sorted and appears in some arbitrary order as returned by the fetchTableListBySchema function. This could be moved into that function to ensure its ordered in a usable way in other parts of the application if that's considered desirable.

When dealing with hundreds of tables it becomes quite tiring searching through the unordered list for the table you want this is potentially made even worse depending on your table naming scheme.

Sorting the table names alleviates some of that strain, personally I think this could be improved further by using something like react-select on this select element.

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update
  • Community content

Checklist:

  • I have read the contributing guide and my code conforms to the guidelines.
  • This change requires a change in the documentation.
  • I have updated the documentation accordingly.
  • I have added required tests.

@hasura-bot
Copy link
Contributor

Beep boop! 🤖

Hey @pthm, thanks for your PR!

One of my human friends will review this PR and get back to you as soon as possible. 🕐

Stay awesome! 😎

@hasura-bot
Copy link
Contributor

Review app for commit 51d8c30 deployed to Heroku: https://hge-ci-pull-1194.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1194-51d8c30

@0x777 0x777 requested a review from praveenweb December 13, 2018 06:51
@shahidhk shahidhk added the c/console Related to console label Dec 15, 2018
@shahidhk shahidhk requested a review from karthikvt26 December 15, 2018 05:10
@praveenweb
Copy link
Member

@pthm - Thanks for the PR.

As you said, this alphabetical sorting can be moved into fetchTableListBySchema function to ensure its ordered in a usable way in other parts of the application.

Can you make the required changes and update the PR?

@praveenweb praveenweb added the s/wip Status: This issue is a work in progress label Dec 19, 2018
>
<option value="">Select table</option>
{tableListBySchema.map(t => {
{tableListBySchema.sort((a, b) => {
Copy link
Member

Choose a reason for hiding this comment

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

Let's move the sort to the main function to reflect it in other parts of the app where its reused.

@hasura-bot
Copy link
Contributor

Review app for commit 23068f5 deployed to Heroku: https://hge-ci-pull-1194.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1194-23068f5

columns: ['*'],
order_by: {
column: 'name',
order: 'asc',
Copy link
Member

Choose a reason for hiding this comment

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

The key is type and not order

@praveenweb
Copy link
Member

@wawhal - Can you fix the conflict and the other issue mentioned above?

@hasura-bot
Copy link
Contributor

Review app for commit 51bad5d deployed to Heroku: https://hge-ci-pull-1194.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1194-51bad5d

@hasura-bot
Copy link
Contributor

Review app for commit e12789f deployed to Heroku: https://hge-ci-pull-1194.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1194-e12789f

@hasura-bot
Copy link
Contributor

Review app for commit 38bc06b deployed to Heroku: https://hge-ci-pull-1194.herokuapp.com
Docker image for server: hasura/graphql-engine:pull1194-38bc06b

@praveenweb praveenweb added s/ok-to-merge Status: This pull request can be merged to master and removed s/wip Status: This issue is a work in progress labels Jan 29, 2019
Copy link
Contributor

@karthikvt26 karthikvt26 left a comment

Choose a reason for hiding this comment

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

LGTM

@shahidhk shahidhk merged commit 638b837 into hasura:master Jan 29, 2019
@hasura-bot
Copy link
Contributor

Beep boop! 🤖

Whoa! 🎉 🎉 💃

GIF

Awesome work @pthm! 💪 🏆 All of us at Hasura ❤️ what you did.

Thanks again 🤗

@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-1194.herokuapp.com is deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/console Related to console s/ok-to-merge Status: This pull request can be merged to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants