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

Conversation

@beerose
Copy link
Contributor

@beerose beerose commented Jan 21, 2020

Affected components

  • Console

What was done

1. Don't show columns that are already chosen for sort in the dropdown.
This would prevent following scenario:

Duplicated columns

How it works:

demo


2. Collapsed columns state was made persistent by storing it in local storage.


3. Fix styles for all columns collapsed state.

Before:
Screenshot 2020-01-23 at 11 31 33

After:
Screenshot 2020-01-23 at 11 32 21


4. Made columns order persistent by storing reorders data in local storage.

It also makes some cleanup:

  1. Columns are in the default state.
  2. User reorders column A from position 2 to 3.
  3. We store this reorder information in the local storage. (A: 2 -> 3)
  4. The user reorders it again to the previous position. (A: 3 -> 2)
  5. Information about (A: 3 -> 2) reorder will be no longer in local storage, since columns A came back at its original place.

Related issues

@netlify
Copy link

netlify bot commented Jan 21, 2020

Deploy preview for hasura-docs ready!

Built with commit 2a1bb65

https://deploy-preview-3753--hasura-docs.netlify.com

@hasura-bot
Copy link
Contributor

Review app for commit 4cfed0a deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-4cfed0a2

@hasura-bot
Copy link
Contributor

Review app for commit f62fbe1 deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-f62fbe13

@beerose beerose force-pushed the browse-table-improvements branch from f62fbe1 to 728788a Compare January 22, 2020 21:22
@hasura-bot
Copy link
Contributor

Review app for commit 728788a deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-728788a1

@hasura-bot
Copy link
Contributor

Review app for commit 8647e1a deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-8647e1ac

@hasura-bot
Copy link
Contributor

Review app for commit 55d4903 deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-55d4903a

@beerose beerose force-pushed the browse-table-improvements branch from 313acb8 to f3581b8 Compare January 23, 2020 13:01
@beerose beerose changed the title WIP: browse table improvements WIP: browse table improvements (#3390) Jan 23, 2020
@hasura-bot
Copy link
Contributor

Review app for commit f3581b8 deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-f3581b8b

@beerose beerose changed the title WIP: browse table improvements (#3390) browse table improvements (#3390) Jan 23, 2020
@beerose beerose marked this pull request as ready for review January 23, 2020 19:45
@beerose beerose requested a review from rikinsk as a code owner January 23, 2020 19:45
@hasura-bot
Copy link
Contributor

Review app for commit 46d7ff9 deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-46d7ff9a

@rikinsk rikinsk added the c/console Related to console label Jan 31, 2020
Copy link
Member

@rikinsk rikinsk left a comment

Choose a reason for hiding this comment

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

Functionality seems to work great

Some UI feedback though

  • The hamburger seems too big currently. You can use the same class used for the sort icon to keep it consistent. Ideally they should be generated via the same function that takes the icon type is input.
  • When a column is collapsed, we should change the title of the expand icon to Expand column "<column_name>". If multiple columns are collapsed and I need to expand one, it is hard to get the right one without guessing and expanding the columns one by one

@hasura-bot
Copy link
Contributor

Review app for commit e8e6dee deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-e8e6deeb

@beerose beerose requested review from a team as code owners April 1, 2020 12:18
@hasura-bot
Copy link
Contributor

Review app for commit 4f290fa deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-4f290fae

@hasura-bot
Copy link
Contributor

Review app for commit 1b49b67 deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-1b49b67d

@rikinsk
Copy link
Member

rikinsk commented Apr 1, 2020

I wasnt quite happy with the hamburger as it makes the header look too crowded. So instead, I removed it and updated the header title to mention it. Also refactored the DragFoldTable to keep it generic for usage in other places.

@hasura-bot
Copy link
Contributor

Review app for commit cf117ad deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-cf117ad4

Copy link
Member

@rikinsk rikinsk left a comment

Choose a reason for hiding this comment

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

UX approved.

During code review please keep in mind that the DragFoldTable is a common component that should remain reusable e.g. the LS keys used should be params so that we can persist state for different DragFoldTables used in other pages as well

@rikinsk rikinsk assigned wawhal and unassigned rikinsk Apr 1, 2020
@rikinsk rikinsk requested a review from wawhal April 1, 2020 14:27
Copy link
Contributor

@marionschleifer marionschleifer left a comment

Choose a reason for hiding this comment

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

Changelog approved.

MAX_WIDTH = 600,
HEADER_PADDING = 62,
CONTENT_PADDING = 18,
HEADER_FONT = 'bold 16px Gudea',
Copy link
Contributor

Choose a reason for hiding this comment

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

Can these defaults come from constants?

Copy link
Member

Choose a reason for hiding this comment

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

As these values are not relevant to any other function, they were defined as constants in the fn def itself and put into params so that they can be overridden if needed.

Copy link
Member

Choose a reason for hiding this comment

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

Feel free to refactor

Copy link
Contributor

Choose a reason for hiding this comment

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

@rikinsk my motivation for this comment was, because these constants are CSS properties, these values shouldn't be hard coded here if anywhere. Because CSS inconsistencies have a very explicit impact on the end user.

@beerose beerose requested a review from wawhal April 3, 2020 14:41
@hasura-bot
Copy link
Contributor

Review app for commit b2ed957 deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-b2ed957c

Copy link
Contributor

@wawhal wawhal left a comment

Choose a reason for hiding this comment

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

Looks good.

@beerose
Copy link
Contributor Author

beerose commented Apr 6, 2020

@rikinsk don't merge it yet. I noticed a bug with foldable columns.

Edit: fixed.

@hasura-bot
Copy link
Contributor

Review app for commit 2a1bb65 deployed to Heroku: https://hge-ci-pull-3753.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3753-2a1bb650

@rikinsk rikinsk merged commit ec56b01 into hasura:master Apr 6, 2020
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-3753.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants