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
COMPASS-564: Indexes Tab order gets reversed on create and delete index #695
Conversation
@@ -580,9 +579,9 @@ function addClickCommands(client) { | |||
/** | |||
* Click on the name header in the index table. | |||
*/ | |||
client.addCommand('clickIndexTableNameHeader', function() { | |||
client.addCommand('clickIndexTableNameHeader', function(columnName) { |
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 would just change this command name now to clickIndexTableHeader
since we are providing the column name and not specifically clicking on the name header.
@@ -29,7 +29,9 @@ const SortIndexesStore = Reflux.createStore({ | |||
*/ | |||
loadIndexes(indexes) { | |||
this.indexes = indexes; | |||
this.sortIndexes(DEFAULT); | |||
this.sortField = DEFAULT; | |||
this.sortOrder = ASC; |
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.
From what I understand from the ticket, we are expecting the sorting to not change from the existing sorting when adding an index? If that is the case, then I think these 2 lines need to change to:
this.sortField = this.sortField || DEFAULT;
this.sortOrder = this.sortOrder || ASC;
This way, any handling of indexes being loaded would retain the current sorting paramters.
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.
Or even better, I believe those 2 lines can move into the init
function... Then load would never have worry about changing them.
I added code based off my comments and pushed to the branch. |
Should make the tests pass deterministically.
It should always be in the reversed order at this point, because the index list is incorrectly toggling the default value.
If the default “Name and Definition” is selected, which was a bizarre UX, now fixed. Also should fix at least one capricious functional test :)
7ca0df0
to
ee2ac56
Compare
And I rebased against master as well. :) |
Needed to resolve issues with master and COMPASS-541 progress.