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

Load labels for terms in Taxonomy Picker #120

Closed
AJIXuMuK opened this Issue Nov 18, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@AJIXuMuK
Copy link
Contributor

AJIXuMuK commented Nov 18, 2018

Category

  • Enhancement
  • Bug
  • Question

Version

Please specify what version of the library you are using: [1.12.0]

Expected / Desired Behavior / Question

Hey folks!
What do you think about adding a feature of requesting labels for terms in Taxonomy Picker?
My initial idea is to add a property, something like includeLabels.
If it is set to true then we request labels for the terms.
And here I have two possible ways to code it that I want to discuss:

  1. We can load the labels right after the terms are loaded: GetAllTerms first and then GetAllLabels for the terms in a batch.
  2. We can load the labels for the term when it is picked by a user. It will potentially decrease amount of data transferred.

Additionally (and it is partially related to #70) we could start using @pnp/sp-taxonomy to simplify requests for the term store items.

Please, share your thoughts on that.

@estruyf estruyf added the enhancement label Dec 6, 2018

@estruyf

This comment has been minimized.

Copy link
Collaborator

estruyf commented Dec 6, 2018

I think option 1 would be the best, as the user immediately sees the labels.

The @pnp/sp-taxonomy is also required, but thinking if it should be a new control, as this is increasing the bundle size a lot. So for small term sets, the current one is good, the @pnp/sp-taxonomy would, in that case, be for large term sets. We can add this to the documentation. What do you think?

@estruyf

This comment has been minimized.

Copy link
Collaborator

estruyf commented Dec 6, 2018

Also thinking about adding actions to terms. For instance, if you click on a term action, it can do a lookup and give you back a message.

@AJIXuMuK

This comment has been minimized.

Copy link
Contributor Author

AJIXuMuK commented Dec 11, 2018

@estruyf
I'll start working on the control probably later this week.
I'll be aiming a separate control, say, EnterpriseTaxonomyPicker.
It will use separate "service" for getting terms info that will be also implemented as a separate class, not new methods in existing Taxonomy service. In that case new control will be totally separated.

For now I'll be working on lazy loading (#70) and labels.

And later we can discuss actions as I didn't completely get the idea for now :)

No ETA for now...

Does it work?

@estruyf

This comment has been minimized.

Copy link
Collaborator

estruyf commented Dec 13, 2018

@AJIXuMuK that sounds great! I will see your PR coming. Thanks!

@AJIXuMuK

This comment has been minimized.

Copy link
Contributor Author

AJIXuMuK commented Dec 14, 2018

@estruyf there are few things I want to resolve in @pnp/sp-taxonomy before implementing this one.
pnp/pnpjs#420 and
pnp/pnpjs#419

@AJIXuMuK

This comment has been minimized.

Copy link
Contributor Author

AJIXuMuK commented Jan 9, 2019

@estruyf
Just FYI: this one is WIP.
fixes from pnpjs are in beta, and I'm working with the beta to prepare new control.

@AJIXuMuK

This comment has been minimized.

Copy link
Contributor Author

AJIXuMuK commented Jan 10, 2019

One more issue from @pnp/sp-taxonomy to track: #449

@estruyf estruyf added this to the 1.14.0 milestone Jan 19, 2019

@estruyf estruyf closed this Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment