elements icon indicating copy to clipboard operation
elements copied to clipboard

Contact > email it's not visible

Open flavioaraujozup opened this issue 3 years ago • 5 comments

Contact > Email is not showed, just the Contact > URL

I'm using this template, but the email is not appearing on screen:

openapi: 3.0.1
info:
  title: My title
  summary: My Summary
  description: |
    My description
  contact:
    name: API Support Team
    email: [email protected]
    url: https://google.com

Expected behavior

I what to show to the users my email address

Environment (remove any that are not applicable):

  • Library version: [unpkg.com/@stoplight/elements/web-components.min.js]
  • OS: [Mac OS Monterey]
  • Browser: [Chrome 96.0.4664.110]
  • Platform: [web]

flavioaraujozup avatar Dec 17 '21 17:12 flavioaraujozup

Hey. Having a quick look at the code, url takes precedence over email. So if you remove url from the openapi doc, you should see a link pointing to email address.

https://github.com/stoplightio/elements/blob/264e31b280f2f745597715ec4582a49e1f3bfd60/packages/elements-core/src/components/Docs/HttpService/AdditionalInfo.tsx#L13

Unfortunately currently it's either/or situation - either url will be shown or email.

Would this be enough to solve your issue, or do you need to show both?

mpodlasin avatar Dec 17 '21 17:12 mpodlasin

Hi @mpodlasin

This solves for now, but on documentation this is not clear that is one or other.

But I think that we should have the option to show both, url and email or let to the user to choose if he wants to show one or other or both.

tks

flavioaraujozup avatar Dec 17 '21 17:12 flavioaraujozup

Absolutely agreed. Thus I am leaving this one open.

mpodlasin avatar Dec 21 '21 09:12 mpodlasin

Hey team! Please add your planning poker estimate with ZenHub @mallachari @mmiask @mpodlasin @Nezteb @paulatulis @wmhilton @domagojk

mnaumanali94 avatar Jan 11 '22 15:01 mnaumanali94

Hi. I observed a similar issue today. If I use the above sample OpenAPI file and remove the email, nothing will be shown in elements. I would assume, the link will be rendered pointing to the URL. image

jschaefer77 avatar Feb 25 '22 14:02 jschaefer77