Skip to content

Commit cb2fc20

Browse files
geraldglynnshockey
authored andcommitted
improvement: move operation JumpToPath (via #4760)
1 parent 85cf0dc commit cb2fc20

File tree

3 files changed

+25
-24
lines changed

3 files changed

+25
-24
lines changed

src/core/components/operation-summary-path.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default class OperationSummaryPath extends PureComponent{
1515
let {
1616
getComponent,
1717
operationProps,
18-
specPath,
1918
} = this.props
2019

2120

@@ -29,8 +28,6 @@ export default class OperationSummaryPath extends PureComponent{
2928
} = operationProps.toJS()
3029

3130
let isShownKey = ["operations", tag, operationId]
32-
33-
const JumpToPath = getComponent("JumpToPath", true)
3431
const DeepLink = getComponent( "DeepLink" )
3532

3633
return(
@@ -40,7 +37,6 @@ export default class OperationSummaryPath extends PureComponent{
4037
isShown={isShown}
4138
path={`${isShownKey.join("/")}`}
4239
text={path} />
43-
<JumpToPath path={specPath} />{/* TODO: use wrapComponents here, swagger-ui doesn't care about jumpToPath */}
4440
</span>
4541

4642
)

src/core/components/operation-summary.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export default class OperationSummary extends PureComponent {
5353
const AuthorizeOperationBtn = getComponent("authorizeOperationBtn")
5454
const OperationSummaryMethod = getComponent("OperationSummaryMethod")
5555
const OperationSummaryPath = getComponent("OperationSummaryPath")
56+
const JumpToPath = getComponent("JumpToPath", true)
5657

5758
return (
5859

@@ -78,6 +79,7 @@ export default class OperationSummary extends PureComponent {
7879
}}
7980
/>
8081
}
82+
<JumpToPath path={specPath} />{/* TODO: use wrapComponents here, swagger-ui doesn't care about jumpToPath */}
8183
</div>
8284
)
8385

src/style/_layout.scss

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -266,26 +266,6 @@
266266

267267
@include text_code();
268268

269-
.view-line-link
270-
{
271-
position: relative;
272-
top: 2px;
273-
274-
width: 0;
275-
margin: 0;
276-
277-
cursor: pointer;
278-
transition: all .5s;
279-
}
280-
281-
&:hover
282-
{
283-
.view-line-link
284-
{
285-
width: 18px;
286-
margin: 0 5px;
287-
}
288-
}
289269
}
290270

291271
.opblock-summary-path__deprecated
@@ -315,8 +295,31 @@
315295
padding: 5px;
316296

317297
cursor: pointer;
298+
299+
.view-line-link
300+
{
301+
position: relative;
302+
top: 2px;
303+
304+
width: 0;
305+
margin: 0;
306+
307+
cursor: pointer;
308+
transition: all .5s;
309+
}
310+
311+
&:hover
312+
{
313+
.view-line-link
314+
{
315+
width: 18px;
316+
margin: 0 5px;
317+
}
318+
}
318319
}
319320

321+
322+
320323
&.opblock-post
321324
{
322325
@include method($_color-post);

0 commit comments

Comments
 (0)