Skip to content

Remove icons from Geometry class sub-categories#108

Merged
alfarok merged 2 commits intoDynamoDS:masterfrom
alfarok:master
Dec 8, 2017
Merged

Remove icons from Geometry class sub-categories#108
alfarok merged 2 commits intoDynamoDS:masterfrom
alfarok:master

Conversation

@alfarok
Copy link
Contributor

@alfarok alfarok commented Dec 4, 2017

Purpose

QNTM-2675

Supplemental Dynamo PR

The purpose of this PR is to remove the icons from the Geometry class sub-categories. The icons beside the Geometry categories is confusing as they look like nodes and not sub-categories.

There are several element types in library which determine the properties each layer has. Thenone element type contains all expandable library items that are not categories or groups (essentially all the interim dropdowns). With this PR even if an icon url is specified it will be ignored so icons can now only be added at the top and bottom levels of the library hierarchy (categories and nodes create action query)

For more info on Element Types see the Librarie Docs

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

FYIs

@Racel

if (this.props.data.itemType !== "group" && this.props.data.itemType !== "section") {
let itemType = this.props.data.itemType;
// If the element type is a section, group, or none an icon shouldn't be displayed
if (itemType !== "group" && itemType !== "section" && itemType !== "none") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

may be you should check the tests and see this is covered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ramramps yes will do, the AC calls for a unit test

@Racel
Copy link

Racel commented Dec 4, 2017

from ux perspective, looks good to me! thanks @alfarok

@mjkkirschner
Copy link
Member

@alfarok also please check the docs to see if the iconUrl is in the layout spec somewhere - if it is, should it now be removed?

@alfarok
Copy link
Contributor Author

alfarok commented Dec 4, 2017

@mjkkirschner correct, they can be removed from the layout spec. If any are added or left in other places they should be simply ignored. I will do that in the Dynamo PR for the Geometry class.

onError={[Function]}
src=""
/>
<div
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjkkirschner @ramramps these tags are no longer generated since the none element type is no longer adding icons so I have to update the snapshot to exclude them. If they were to get generated the test will now fail. You can see the tests that generate these 2 snaps here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dynamo dynamically generates the data in the libraryUI so it is hard ensure all the required items are loaded in Librarie, for example if I wanted to verify icons are still generated for the nodes. I am not sure if this is adequate or if there is a better approach I could be taking here.

@alfarok alfarok added the PTAL label Dec 7, 2017
@alfarok alfarok merged commit d403815 into DynamoDS:master Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants