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

Updated PropertyFieldTermPicker to be able to pick terms as close to the OOB Term picker in sharepoint #39

Closed
wants to merge 5 commits into from

Conversation

spdavid
Copy link
Contributor

@spdavid spdavid commented Apr 3, 2018

Q A
Bug fix? [ ]
New feature? [X ]
New sample? [ ]
Related issues? fixes #X, partially #Y, mentioned in #Z

What's in this Pull Request?

Changed ICheckedTerm.Id to ICheckedTerm.Key so it would work as an interface in the BasePicker
Added ICheckedTerm.TermSetName property to interface so it can be shown in the custom rendering of the suggestions of the TermPicker

Changed ICheckedTerm to IPickerTerm for semantic reasons

Created New TermPicker Component Inheriting from BasePicker. Use custom Rendering for suggestions and Tag Rendering.

Removed Texbox and Added Custom TermPicker Component in the PropertyFieldTermPickerHost

Added Functionality to SPTermStorePickerService to support the TermPicker autocompletion

Note: Might be some breaking changes here. EG. ICheckedTerm namechange and change from ID to Key. Had to make some decisions here as there were a lot of changes and didn't see a way around it without redundant data.

Other Notes: When searching terms when limitByGroupNameOrID there can be performance issues with large termsets as i loop through each. There is no group.getTerms method. There may be room for optimization here when I think of something better.

Sorry for the large pull request. :)

@msftclas
Copy link

msftclas commented Apr 3, 2018

CLA assistant check
All CLA requirements met.

@spdavid
Copy link
Contributor Author

spdavid commented Apr 3, 2018

CircleCI failed. Works on my computer. :)

Seems there is a Node version difference. Not sure if this can be the problem or not.

CircleCI versions
[13:05:02] Project @pnp/spfx-property-controls version: 1.4.2
[13:05:02] Build tools version: 3.0.5
[13:05:02] Node version: v6.11.5
[13:05:02] Total duration: 14 s

My Versions
[15:14:36] ==================[ Finished ]==================
[15:14:36] Project @pnp/spfx-property-controls version: 1.4.2
[15:14:36] Build tools version: 3.0.5
[15:14:36] Node version: v8.9.4
[15:14:36] Total duration: 11 s

@estruyf
Copy link
Member

estruyf commented Apr 3, 2018

@spdavid thanks, will take a look at it this week.

It cannot build, because you references this '../../lib/propertyFields/termPicker/TermSet' in one of your files. During the build, the lib folder will be empty, so the TermSet file will not exist. These type of imports typically happen with auto-importing. Always be sure to reference files in the src folder.

Something I always do is running my jobs like this: gulp clean && gulp bundle, that way I'm sure I always start clean and my references are correct. Will update the reference during the tests.

@estruyf
Copy link
Member

estruyf commented Apr 3, 2018

Would you also be able to write the documentation for your control? Current documentation can be found here: https://github.com/SharePoint/sp-dev-fx-property-controls/tree/master/docs/documentation/docs

@spdavid
Copy link
Contributor Author

spdavid commented Apr 3, 2018

change to the Lib import fixed the problem. Documentation will be updated soon.

@estruyf estruyf added this to the v1.5.0 milestone Apr 5, 2018
@spdavid
Copy link
Contributor Author

spdavid commented Apr 10, 2018

Documentation updated. and one small bug fix for local workbench

@spdavid spdavid closed this Apr 10, 2018
@spdavid spdavid reopened this Apr 10, 2018
@estruyf
Copy link
Member

estruyf commented Apr 10, 2018

@spdavid you just added new things while I was doing the merge :-). Will try to add these things as well.

BTW: did a small code change to the suggestion list. All selected terms are now filtered out so that you cannot have duplicates.

@estruyf
Copy link
Member

estruyf commented Apr 10, 2018

@spdavid it got merged. Thanks for the Term Picker updates!

@AJIXuMuK
Copy link
Collaborator

Awesome job!

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

Successfully merging this pull request may close these issues.

4 participants