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

Fix sort indicator for DataTables #62795

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

Merged
merged 2 commits into from
Aug 13, 2020

Conversation

Wikiwix
Copy link
Contributor

@Wikiwix Wikiwix commented Aug 3, 2020

Description

As per material spec ascending order should be shown via an upward arrow
This PR changes the displayed arrows accordingly. for DataTables as well as PaginatedDataTables

In theory adding a single ! to inverse the ascending value would have had the same effect as my suggested change. My change tries to keep the code concise and intuitive.
I kept the original formatting to make the changes easier to review, although dartfmt would suggest quite some "whitespace" changes.

Related Issues

Tests

A test to check that the arrow indicator has the proper orientation was added.

Checklist

Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. work in progress; do not review labels Aug 3, 2020
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@Wikiwix Wikiwix force-pushed the Fix-sort-indicator-data-table branch 2 times, most recently from c8c3aec to e199b52 Compare August 4, 2020 15:25
@Wikiwix
Copy link
Contributor Author

Wikiwix commented Aug 4, 2020

@googlebot I signed it!

@Wikiwix Wikiwix marked this pull request as ready for review August 4, 2020 15:35
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Aug 5, 2020
@Hixie
Copy link
Contributor

Hixie commented Aug 5, 2020

Change looks good but it does need a test. In theory you would think that this change should have broken one, but I guess our test coverage was insufficient in this area.

@Wikiwix
Copy link
Contributor Author

Wikiwix commented Aug 5, 2020

@Hixie Ok, I will have a look, but it is going to be a while as this will be my first UI test… 🙈

@HansMuller HansMuller requested a review from darrenaustin August 6, 2020 23:42
As per material spec ascending order should be shown via an upward arrow
This commit changes the displayed arrows accordingly.
@Wikiwix Wikiwix force-pushed the Fix-sort-indicator-data-table branch from e199b52 to 2ed63ed Compare August 9, 2020 16:38
@Wikiwix
Copy link
Contributor Author

Wikiwix commented Aug 9, 2020

@Hixie Added a unit test as requested :)
Hope it is what you expected.

Copy link
Contributor

@darrenaustin darrenaustin left a comment

Choose a reason for hiding this comment

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

Nice job. Thanks for the contribution. I just had a minor nit on the name of the test, but otherwise it LGTM. Also you should update the description in the PR to include that you added a test to verify the arrow was pointing in the correct orientation.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@Wikiwix
Copy link
Contributor Author

Wikiwix commented Aug 13, 2020

Nice job. Thanks for the contribution. I just had a minor nit on the name of the test, but otherwise it LGTM. Also you should update the description in the PR to include that you added a test to verify the arrow was pointing in the correct orientation.

Thanks :)
Updated the description and commited your suggestion. (FYI: I actually felt the same as you about the test name, but I followed – what seemed to me, like – the standard of test names in the file 🙈 )

@Wikiwix Wikiwix force-pushed the Fix-sort-indicator-data-table branch from 7d2ef62 to 4a1d77d Compare August 13, 2020 18:50
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@darrenaustin
Copy link
Contributor

Updated the description and commited your suggestion. (FYI: I actually felt the same as you about the test name, but I followed – what seemed to me, like – the standard of test names in the file 🙈 )

Ah, I didn't look at the context. Perhaps the original author had a different opinion, in which case you were probably right to follow what was there. At any rate, let's go with this for now. Once the tests pass I will get it merged. Thx.

@Wikiwix
Copy link
Contributor Author

Wikiwix commented Aug 13, 2020

@darrenaustin Right now everything is green :)

@darrenaustin darrenaustin merged commit 88118bc into flutter:master Aug 13, 2020
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
* Fix sort indicator for DataTables

As per material spec ascending order should be shown via an upward arrow
This commit changes the displayed arrows accordingly.

* Test sort indicator orientation in DataTable
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants