Skip to content

Conversation

@P0lip
Copy link
Contributor

@P0lip P0lip commented May 21, 2019

See the STU-180 story for more info.

Light theme:
Screenshot_20190521_222134
Dark theme:
Screenshot_20190521_221951

Open questions:

  • is tooltip-based approach a right call?
  • should we make URL a bit more flexible and allow it to be, say, a callback? it might make routing easier in the future.
  • how would the Studio integration look like?

@P0lip P0lip changed the title feat: ref details popover feat: ref details popover [STU-180] May 21, 2019
@P0lip P0lip changed the title feat: ref details popover [STU-180] feat: ref details popover [STU-185] May 21, 2019
@P0lip P0lip marked this pull request as ready for review May 21, 2019 19:23
@P0lip P0lip requested review from casserni, lottamus and marbemac May 21, 2019 19:23
@lottamus
Copy link
Contributor

lottamus commented May 21, 2019

Could just do a simple inline "(go to ref)" like we had in Next?

Clicking "(go to ref)" could emit JsonSchemaEditorStoreEvents.GoToRef or something and let the consumer handle it however.

Studio can listen to that event:

  • If the $ref is local to the project, we can look up a Model node that matches the given URI, and set it as the active node.
  • If the $ref is absolute or a url, we can attempt to open it in the browser.

image

@marbemac
Copy link
Contributor

I agree with @lottamus - what do you think @P0lip?

@P0lip
Copy link
Contributor Author

P0lip commented May 22, 2019

@marbemac
Already implemented in https://github.com/stoplightio/json-schema-editor/pull/24
Shall we apply the same change to JSV?

@lottamus
Copy link
Contributor

Shall we apply the same change to JSV?

Yeah I'd say so. But if we're showing a $ref in JSV it's likely because we couldn't resolve it so its unlikely that the $ref even exists

@P0lip P0lip merged commit 281eccb into master Jun 2, 2019
@P0lip P0lip deleted the feat/STU-185/ref-details branch June 2, 2019 13:45
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants