Skip to content

Symbol links should respect the formatting provided in overridingTitleInlineContent #645

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

Conversation

marinaaisa
Copy link
Member

@marinaaisa marinaaisa commented May 8, 2023

Bug/issue #108515663, if applicable:

Summary

Symbol links should respect the formatting provided in overridingTitleInlineContent

Before

Screenshot 2023-05-08 at 19 32 41

After

Screenshot 2023-05-08 at 19 32 26

Dependencies

NA

Testing

eat(_:quantity:).json.zip

Steps:

  1. Use json attached in your doccarchive and run VUE_APP_DEV_SERVER_PROXY=[path to doccarchive] npm run serve
  2. Go to http://localhost:8080/documentation/slothcreator/Sloth/eat(_:quantity:)
  3. Assert that "energy" inside Discussion section does not use the CodeVoice component

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

@@ -43,7 +43,7 @@ export default {
return name !== notFoundRouteName;
},
isSymbolReference() {
return this.kind === 'symbol'
return (this.kind === 'symbol' || this.kind === 'codeVoice')
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that this is the right approach since it mixes the already well defined values that kind can be with our own custom values like this.

In this specific situation, you'll actually end up with a doubly nested <code> element, which is not ideal, although it may look right in your example. One comes from the reference component that this logic determines and another would would come through the content itself.

I think what we actually want is just to short-circuit this logic in the case that we have a reference with an overridingTitleInlineContent value, which is really close to the approach you have here, but not quite the same. Basically, in the case where a developer has provided custom text, we want to defer to their inline formatting and not apply any extra.

Copy link
Contributor

Choose a reason for hiding this comment

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

I went ahead and opened an alternative PR based on this feedback if you'd like to review that: #647

Copy link
Contributor

@dobromir-hristov dobromir-hristov left a comment

Choose a reason for hiding this comment

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

Looked at both this and #647, and I think that one has a better approach.

@marinaaisa
Copy link
Member Author

Closing this PR in favor of #647

@marinaaisa marinaaisa closed this May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symbol links with custom authored titles are rendered in code voice
3 participants