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

feat(AutoComplete): Add API source #125

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Pooya-Oladazimi
Copy link
Collaborator

@Pooya-Oladazimi Pooya-Oladazimi commented Aug 21, 2024

Added API source tag to autocomplete results when API gateway is chosen as the endpoint.

Screenshot from 2024-08-26 09-59-24

Add api source tag to autocomplete results when API gateway is chosen as the endpoint.
@Pooya-Oladazimi Pooya-Oladazimi added the enhancement New feature or request label Aug 21, 2024
Enable users to set the widget to show the api source in case of using the gateway. Plus adding a new story as an example.
rebuild the package-lock.json
Add the new api source flag to the html d.ts. Build the plain js version.
marginLeft: "10px"
}}
>
{"Source: " + value.source}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is it necessary to see the full source API address at first glance?

Would it be more user friendly to just show OLS or SKOSMOS or ONTOPORTAL as the badge? The full source address is then shown in the hover.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is the correct badge to use is the question. Like "OLS" as the platform name or "TIB" and "ZBmed" as the provider organizations?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah true. But leaving the end-user with the URL of the API doesn't make sense to me. Maybe both (provider and platform) are interesting, but in a presentation that is easy to read. Furthermore, a badge with a long address might lead to overflow of the line. We have use cases that need a small layout (e.g. #98).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I mean, this is a general point for the Gateway too. At the moment, it expects "ontoportal, ols, skosmos" as the databases. Is this the use-case? I think we should consider that maybe one wants to search based on the provider like zbmed. Do users care more about the software platform or the provider Org?

cc: @syphax-bouazzouni

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe filtering should be allowed for both, provider and platform. Question is, what information do we present on the small space in the autocomplete drop down menu. I'm not sure anymore, if the user needs the software platform information at all. Also the BreadcrumbWidget, especially the short form (mostly a big number) may not be ideal. Maybe we should ask an end-user/create some use cases.

use the backend_type as the api source text, return back the prefix -> shortForm text, fix style issue
@jusa3
Copy link
Collaborator

jusa3 commented Aug 29, 2024

I liked to get the API URL in the hover menu as a detail information...

The idea was to implement the MetadataWidget as hover menu instead of the string as we do it now. There we can provide a lot of detail information such as the provider organisation and the software platform and the API URL. #127

@jusa3
Copy link
Collaborator

jusa3 commented Sep 5, 2024

I did not merge this PR yet, since we didn't find a solution how the new feature should look like. I updated the PR to resolve potential merge conflicts due to a larger update on the main branch.

Last idea was to remove the badges and add an "information" (i) icon for the user to hover with detailed information. But we already have this hover function when hovering over a term:
image

The feature currently looks like this:
image

use source_name instead of the backend_type. show the source endpoint in the hover box.
@Pooya-Oladazimi
Copy link
Collaborator Author

Last commit changes:

  • Used the source_name instead of the backend_type
  • Show the source endpoint in the hover box

Screenshot from 2024-09-16 13-28-37

@rombaum
Copy link
Collaborator

rombaum commented Oct 6, 2024

Last idea was to remove the badges and add an "information" (i) icon for the user to hover with detailed information.

@Pooya-Oladazimi You could use
grafik
<EuiIcon type={"iInCircle"}/>
from the EuiIcon library. And with the hover the complete source information could be shown as you show in your last comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants