Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Title = ({ title = "", schema }) => {

if (!renderedTitle) return null

return <div className="json-schema-2020-12__title">{renderedTitle}</div>
return <strong className="json-schema-2020-12__title">{renderedTitle}</strong>
}

Title.propTypes = {
Expand Down
4 changes: 2 additions & 2 deletions src/core/plugins/json-schema-5/components/array-model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export default class ArrayModel extends Component {
const Link = getComponent("Link")

const titleEl = title &&
<span className="model-title">
<strong className="model-title">
<span className="model-title__text">{ title }</span>
</span>
</strong>

/*
Note: we set `name={null}` in <Model> below because we don't want
Expand Down
4 changes: 2 additions & 2 deletions src/core/plugins/json-schema-5/components/model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export default class Model extends ImmutablePureComponent {
}

if(!schema) {
return <span className="model model-title">
return <strong className="model model-title">
<span className="model-title__text">{ displayName || name }</span>
{!$ref && <RollingLoadSVG height="20px" width="20px" />}
</span>
</strong>
}

const deprecated = specSelectors.isOAS3() && schema.get("deprecated")
Expand Down
4 changes: 2 additions & 2 deletions src/core/plugins/json-schema-5/components/models.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ export default class Models extends Component {
includeWriteOnly = {true}/>

const title = <span className="model-box">
<span className="model model-title">
<strong className="model model-title">
{displayName}
</span>
</strong>
</span>

return <div id={ `model-${name}` } className="model-container" key={ `models-section-${name}` }
Expand Down
4 changes: 2 additions & 2 deletions src/core/plugins/json-schema-5/components/object-model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class ObjectModel extends Component {
const not = specSelectors.isOAS3() ? schema.get("not") : null

const titleEl = title && (
<span className="model-title">
<strong className="model-title">
{isRef && schema.get("$$ref") && (
<span
className={classNames("model-hint", {
Expand All @@ -111,7 +111,7 @@ export default class ObjectModel extends Component {
</span>
)}
<span className="model-title__text">{title}</span>
</span>
</strong>
)

return (
Expand Down
4 changes: 2 additions & 2 deletions src/core/plugins/json-schema-5/components/primitive-model.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export default class Primitive extends Component {
const ModelExtensions = getComponent("ModelExtensions")

const titleEl = title && (
<span className="model-title">
<strong className="model-title">
<span className="model-title__text">{title}</span>
</span>
</strong>
)

return (
Expand Down
1 change: 1 addition & 0 deletions src/style/_models.scss
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ section.models {

.model-title {
font-size: 16px;
font-weight: inherit;

@include type.text_headline($section-models-model-title-font-color);

Expand Down
6 changes: 3 additions & 3 deletions test/e2e-selenium/scenarios/bugs/4536.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ describe("bug #4536: model name consistency", function () {
done()
})
it("consistently displays a model's name regardless of expansion state", function (client) {
client.waitForElementVisible("span.model.model-title", 10000)
.assert.containsText("span.model.model-title", "TitleName")
.click("span.model.model-title")
client.waitForElementVisible("strong.model.model-title", 10000)
.assert.containsText("strong.model.model-title", "TitleName")
.click("strong.model.model-title")
.pause(500)
.assert.containsText("span.model-title__text", "TitleName")

Expand Down