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

add entity peek ahead component #15014

Merged
merged 38 commits into from
Jan 5, 2023
Merged

Conversation

punkle
Copy link
Contributor

@punkle punkle commented Dec 5, 2022

Signed-off-by: Brian Fletcher brian@roadie.io

Hey, I just made a Pull Request!

add entity peek ahead component

closes #13678

It looks like this:

image

or for a group / user with an email it looks like this:

image

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Signed-off-by: Brian Fletcher <brian@roadie.io>
@punkle punkle requested a review from a team as a code owner December 5, 2022 09:13
Signed-off-by: Brian Fletcher <brian@roadie.io>
@github-actions github-actions bot added the area:catalog Related to the Catalog Project Area label Dec 5, 2022
Signed-off-by: Brian Fletcher <brian@roadie.io>
@punkle punkle requested a review from a team as a code owner December 5, 2022 09:20
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/plugin-catalog-react plugins/catalog-react patch v1.2.2

Signed-off-by: Brian Fletcher <brian@roadie.io>
Signed-off-by: Brian Fletcher <brian@roadie.io>
Signed-off-by: Brian Fletcher <brian@roadie.io>
@github-actions github-actions bot added the area:techdocs Related to the TechDocs Project Area label Dec 5, 2022
Signed-off-by: Brian Fletcher <brian@roadie.io>
@github-actions github-actions bot added the area:scaffolder Everything and all things related to the scaffolder project area label Dec 5, 2022
Signed-off-by: Brian Fletcher <brian@roadie.io>
Signed-off-by: Brian Fletcher <brian@roadie.io>
@punkle
Copy link
Contributor Author

punkle commented Dec 6, 2022

We have the option of using the color of the text, chips or italics to allow the reader to understand the information a little better.

Copy link
Member

@freben freben left a comment

Choose a reason for hiding this comment

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

Cool stuff!

Signed-off-by: Brian Fletcher <brian@roadie.io>
Signed-off-by: Brian Fletcher <brian@roadie.io>
Signed-off-by: Brian Fletcher <brian@roadie.io>
@github-actions github-actions bot removed area:techdocs Related to the TechDocs Project Area area:scaffolder Everything and all things related to the scaffolder project area labels Dec 7, 2022
Signed-off-by: Brian Fletcher <brian@roadie.io>
@freben
Copy link
Member

freben commented Dec 15, 2022

That MUST be a builtin feature of material-ui-popup-state I'd hope!

@punkle
Copy link
Contributor Author

punkle commented Dec 15, 2022

@freben I havent quite found that setting yet. But let me drill further.

@punkle
Copy link
Contributor Author

punkle commented Dec 15, 2022

There is an open issue for this jcoreio/material-ui-popup-state#85

Signed-off-by: irma12 <irma@roadie.io>
@Irma12
Copy link
Contributor

Irma12 commented Dec 19, 2022

@freben I have added a prop 'delayTime' so we should be able to make it work now 🤞🏼

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2022

Uffizzi Preview deployment-9292 was deleted.

Signed-off-by: irma12 <irma@roadie.io>
@punkle
Copy link
Contributor Author

punkle commented Dec 19, 2022

Thanks Irma for helping me out. I felt a little stuck there.

@freben I am noticing that gmail has a delay of 1.5 seconds and github has a delay of less than a second.

Irma has set the default value to 0.5 seconds. Let us know if you would like it longer.

Signed-off-by: Brian Fletcher <brian@roadie.io>
@github-actions github-actions bot added the area:scaffolder Everything and all things related to the scaffolder project area label Dec 19, 2022
Signed-off-by: Brian Fletcher <brian@roadie.io>
Signed-off-by: Brian Fletcher <brian@roadie.io>
@github-actions github-actions bot removed the area:scaffolder Everything and all things related to the scaffolder project area label Dec 20, 2022
@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented Dec 20, 2022

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/plugin-catalog-react plugins/catalog-react patch v1.2.4-next.1

Copy link
Member

@freben freben left a comment

Choose a reason for hiding this comment

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

Still some behavioural issues I think

<Card>
<CardContent>
<Alert severity="warning">
{entityRef} was not found {error?.message}
Copy link
Member

Choose a reason for hiding this comment

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

Wording gets odd.

Screenshot 2022-12-21 at 10 06 28

Should probably be a <ResponseErrorPanel error={error} /> instead of an Alert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


return (
<>
{' '}
Copy link
Member

Choose a reason for hiding this comment

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

probably unintentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so. Its removed now.

}}
>
<>
{loading && <Progress />}
Copy link
Member

Choose a reason for hiding this comment

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

note in the story how the progress looks (stacked at the top with no padding), it should probably be inside a card content as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

{' '}
<span
onMouseEnter={debouncedHandleMouseEnter}
onMouseLeave={handleOnMouseLeave}
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to work, did you try it out carefully in the storybook? You can't enter the popover card at all; it closes if you try. If you try to slowly go with the mouse pointer into the test button in the storybook from below, the popover never shows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to fix this. Could you take a look now.

export const EmailCardAction = ({ email }: { email: string }) => {
return (
<Tooltip title={`Email ${email}`}>
<Button target="_blank" href={`mailto:${email}`} size="small">
Copy link
Member

Choose a reason for hiding this comment

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

To get it behaviorally the same as our links, could you try out whether <IconButton component={Link} to={<url>} size="small"> works as intended? I think it might. See for example

Using our Link of course, not the one in MUI. Adding aria-label is bonus points

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

return (
<>
<Tooltip title="Show details">
<Link
Copy link
Member

Choose a reason for hiding this comment

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

should this also have been IconButton and component={Link}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

import { CompoundEntityRef } from '@backstage/catalog-model';
import { entityRouteRef } from '../../routes';
import { CatalogApi } from '@backstage/catalog-client';

Copy link
Member

Choose a reason for hiding this comment

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

I think it would be really valuable to have a table as one of the stories, to get a feeling for how it feels in a context where there are lots of links and getting some of the overlap problems visible if any

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Signed-off-by: Brian Fletcher <brian@roadie.io>
Signed-off-by: Brian Fletcher <brian@roadie.io>
@freben
Copy link
Member

freben commented Dec 28, 2022

(just popping in to mention I'm off for the holidays and reviews might take a while longer)

@punkle punkle requested a review from freben January 3, 2023 21:17
Copy link
Member

@freben freben left a comment

Choose a reason for hiding this comment

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

Alright, let's :shipit:

@freben freben merged commit 2ba88fe into backstage:master Jan 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2023

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.10.0 release, scheduled for Tue, 17 Jan 2023.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:catalog Related to the Catalog Project Area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

contact catalog item owner from dropdown
7 participants