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

SaveDropDownSelectedItem #9367

Merged
merged 8 commits into from
Jan 8, 2019
Merged

SaveDropDownSelectedItem #9367

merged 8 commits into from
Jan 8, 2019

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Jan 4, 2019

Please Note:

  1. Before submitting the PR, please review How to Contribute to Dynamo
  2. Dynamo Team will meet 1x a month to review PRs found on Github (Issues will be handled separately)
  3. PRs will be reviewed from oldest to newest
  4. If a reviewed PR requires changes by the owner, the owner of the PR has 30 days to respond. If the PR has seen no activity by the next session, it will be either closed by the team or depending on its utility will be taken over by someone on the team
  5. PRs should use either Dynamo's default PR template or one of these other template options in order to be considered for review.
  6. PRs that do not have one of the Dynamo PR templates completely filled out with all declarations satisfied will not be reviewed by the Dynamo team.
  7. PRs made to the DynamoRevit repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after a LGTM label is added to the PR.

Purpose

REVIT-141868
DynamoRevit 2.x Categories Dropdown Produces Inconsistent Results Between Revit versions.
Also fixes DynamoDS/DynamoRevit#2281

I believe this is a more complete version of what you're trying to achieve. @ZiyunShang Let me know how you want to cooperate this task

TODOs:

  • Add Json Unit tests
  • Add XML Unit tests
  • Testing undo redo
"Nodes": [
    {
      "ConcreteType": "DSRevitNodesUI.Categories, DSRevitNodesUI",
      "SelectedIndex": 6,
      "SelectedString": "OST_DuctTerminal",
      "NodeType": "ExtensionNode",
      "Id": "e16b9ac4ad604e7eb4d29a7975335d7c",
      "Inputs": [],
      "Outputs": [
        {
          "Id": "ac2e1b04ef994a4fb5dbe4b2855d1097",
          "Name": "Category",
          "Description": "The selected Category.",
          "UsingDefaultValue": false,
          "Level": 2,
          "UseLevels": false,
          "KeepListStructure": false
        }
      ],
      "Replication": "Disabled",
      "Description": "All built-in categories."
    }
  ]

I have did my manual testing in three basic cases:

  • Using master build, place a categories node into canvas and save
  • Using master build, opening a DYN saved in Dynamo 2.1.0 w/ R2020 worked
  • Using master build, opening a DYN saved in Dynamo 1.3.3 w/ R2019 worked
    image

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@mjkkirschner @ZiyunShang

FYIs

@QilongTang QilongTang added the WIP label Jan 4, 2019
@ZiyunShang
Copy link
Contributor

ZiyunShang commented Jan 4, 2019

Hi @QilongTang , it seems like all the subclass of DSDropDownBase would set their SelectedString and save to .dyn files, right? It looks good to me. I would close my PR.

@mjkkirschner
Copy link
Member

mjkkirschner commented Jan 4, 2019

@QilongTang in your manual testing did you also switch the version of revit or only the version of dynamo on which you opened and saved the graphs? To replicate this the number of items or order of them must be changed between saving and loading, which would be accomplished by adding new types (family types) or switching revit version. Seems a unit test could also replicate this issue with some mocked data.

@QilongTang
Copy link
Contributor Author

QilongTang commented Jan 4, 2019

@mjkkirschner See picture I attached, I tested a valid use by opening a DYN saved w/ Dynamo 1.3.3 Revit 2019 in Dynamo 2.2.0 R2020. The selection is differen index between two version. I will make unit tests.

@QilongTang QilongTang removed the WIP label Jan 7, 2019
@mjkkirschner
Copy link
Member

LGTM

@mjkkirschner mjkkirschner added the LGTM Looks good to me label Jan 7, 2019
@mjkkirschner
Copy link
Member

@QilongTang this is to cherry pick right?

@QilongTang
Copy link
Contributor Author

@mjkkirschner This is for master branch

@mjkkirschner
Copy link
Member

@QilongTang you don't intend to get this to 2.1 as well?

@QilongTang
Copy link
Contributor Author

@mjkkirschner For some reason, the self CI job has been hanging so I can't cherry-pick before that comes out

@QilongTang QilongTang merged commit 65d4687 into master Jan 8, 2019
@QilongTang QilongTang deleted the SaveDropDownSelectedItem branch January 8, 2019 03:42
QilongTang added a commit that referenced this pull request Jan 8, 2019
* SaveDropDownSelectedItem

* Updates to use internal cate

* Update comments

* Update the syncing logic

* Add Dynamo 2.1 Dropdown Unit Tests

* Add XML tests

* Update Unit tests
QilongTang added a commit that referenced this pull request Jan 8, 2019
* SaveDropDownSelectedItem

* Updates to use internal cate

* Update comments

* Update the syncing logic

* Add Dynamo 2.1 Dropdown Unit Tests

* Add XML tests

* Update Unit tests
QilongTang added a commit that referenced this pull request Feb 13, 2020
* SaveDropDownSelectedItem

* Updates to use internal cate

* Update comments

* Update the syncing logic

* Add Dynamo 2.1 Dropdown Unit Tests

* Add XML tests

* Update Unit tests
@QilongTang QilongTang mentioned this pull request Feb 13, 2020
7 tasks
@pinzart90 pinzart90 mentioned this pull request Oct 11, 2023
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM Looks good to me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DynamoRevit 2.x Categories Dropdown Produces Inconsistent Results Between Revit versions
4 participants