ts4nfdi / terminology-service-suite

The Terminology Service Suite project is a collection of interactive widgets designed to ease the integration of terminology service functions into third-party applications.
https://ts4nfdi.github.io/terminology-service-suite/comp/latest/
MIT License
16 stars 2 forks source link

confusion regading the description widget #169

Closed Pooya-Oladazimi closed 1 day ago

Pooya-Oladazimi commented 1 day ago

The description widget at the moment is just accept an input text and renders it:

function DescriptionPresentation(props: DescriptionPresentationProps) {
  const {descText, description, ...rest} = props;

  return (
    <>
      <EuiText {...rest}>{descText || description}</EuiText>
    </>
  );
}

@jusa3 @VincentKneip what do you think?

jusa3 commented 1 day ago

This is the DescriptionPresentation component. It is not a widget. It's purpose is to render the text for the DescriptionWidget. The DescriptionPresentation is used in the MetadataWidget to avoid multiple requests.

The DescriptionWidget does exactly as you described, see https://github.com/ts4nfdi/terminology-service-suite/blob/main/src/components/widgets/MetadataWidget/DescriptionWidget/DescriptionWidget.tsx#L23

Pooya-Oladazimi commented 1 day ago

@jusa3 aha thanks. I got confused.