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

Unable to Change Directions in Order Table Block #21

Open
maroon-scorch opened this issue Feb 8, 2021 · 1 comment
Open

Unable to Change Directions in Order Table Block #21

maroon-scorch opened this issue Feb 8, 2021 · 1 comment

Comments

@maroon-scorch
Copy link
Collaborator

maroon-scorch commented Feb 8, 2021

For blocks such as the following:

order some-table:
  column1 ascending,
  column2 descending
end

When clicking on the option to ascend or descend, they do change into the opposite direction:
Clicked:
107183622-b9f00500-69a4-11eb-8b74-b8a5bb4764f1 (1)
Unclicked:
image
But the value does not change afterwards.

  • Relevant constructors for Order Table can be found under class TableOrder and ColumnSort for "ast.tsx", and "s-table-order" and "'s-column-sort" for "PyretParser.ts"
@maroon-scorch
Copy link
Collaborator Author

maroon-scorch commented Jul 25, 2021

Update: Workaround has been found for this issue

Now clicking on the table:
image
yields the following result:
order
Changing the highlighted text into "descending" works, and changing it into any other string except for "ascending" and "descending" is not accepted by the editor:
image

Workaround now requires user to change the text "ascending" to "descending" because the node for that is a String Literal Node, might be more efficient if the change is done for them, since there are only 2 options for column sorts (Are there nodes that only lets the user make binary choices?).

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

No branches or pull requests

1 participant