Skip to content

Commit fe8a8dc

Browse files
authored
Plist links in topics section should not be in code voice (#390) 62751444
Plist links in topics section should not be in code voice 62751444
1 parent 3dce0b8 commit fe8a8dc

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

src/components/DocumentationTopic/TopicsLinkBlock.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ export default {
180180
if (topic.titleStyle === TitleStyles.title) {
181181
return topic.ideTitle ? 'span' : 'code';
182182
}
183-
// Framework name links should not be code voice
184-
if (topic.role && topic.role === TopicRole.collection) return 'span';
183+
// Framework name and property list links and should not be code voice
184+
if (topic.role && (topic.role === TopicRole.collection || topic.role === TopicRole.dictionarySymbol)) return 'span';
185185
186186
switch (topic.kind) {
187187
case TopicKind.symbol:

tests/unit/components/DocumentationTopic/TopicsLinkBlock.spec.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,21 @@ describe('TopicsLinkBlock', () => {
155155
expect(wordBreak.text()).toBe(propsData.topic.title);
156156
});
157157

158-
it('renders a `WordBreak` using <code> tag for Framework name links in Topic that do NOT have role collection', () => {
158+
it('renders a `WordBreak` using <span> tag for property list links in Topic, which have role dictionarySymbol', () => {
159+
wrapper.setProps({
160+
topic: {
161+
...propsData.topic,
162+
role: TopicRole.dictionarySymbol,
163+
kind: TopicKind.symbol,
164+
},
165+
});
166+
const wordBreak = wrapper.find('.link').find(WordBreak);
167+
expect(wordBreak.exists()).toBe(true);
168+
expect(wordBreak.attributes('tag')).toBe('span');
169+
expect(wordBreak.text()).toBe(propsData.topic.title);
170+
});
171+
172+
it('renders a `WordBreak` using <code> tag for Framework name links in Topic that do NOT have role collection or dictionarySymbol', () => {
159173
wrapper.setProps({ topic: { ...propsData.topic, kind: TopicKind.symbol } });
160174
const wordBreak = wrapper.find('.link').find(WordBreak);
161175
expect(wordBreak.exists()).toBe(true);

tests/unit/components/Navigator/NavigatorCardItem.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ describe('NavigatorCardItem', () => {
188188
expect(wrapper.emitted()).toEqual({ 'toggle-full': [[defaultProps.item]] });
189189
});
190190

191-
192191
it('emits a `toggle-full` event, when @keydown.right + alt/option the tree-toggle button', () => {
193192
const wrapper = createWrapper();
194193
wrapper.find('.tree-toggle').trigger('keydown.right', {

0 commit comments

Comments
 (0)