Skip to content

Commit 5d31dc8

Browse files
LianaHusAniket-Engg
authored andcommitted
vyper compilation detais tab fixes. Doc gen tab fixes
1 parent d02b78a commit 5d31dc8

File tree

8 files changed

+26
-24
lines changed

8 files changed

+26
-24
lines changed

apps/doc-viewer/src/app/App.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ export default function App() {
1515
const edit = () => {
1616
if (!client.mdFile) return
1717
client.call('fileManager', 'open' as any, client.mdFile)
18+
client.call('fileManager', 'switchFile' as any, client.mdFile) //@TODO check why this doesn't work
1819
}
1920
return (
2021
<>
21-
<div className="m-5 p-2">
22-
<button className="btn btn-secondary mb-2" onClick={edit}>EDIT</button>
22+
<div className="bg-light p-5">
23+
<button className="btn btn-sm border mb-2" onClick={edit}>EDIT</button>
2324
<ReactMarkdown children={contents} remarkPlugins={[remarkGfm]} />
2425
</div>
2526
</>

apps/remix-ide/src/app/components/panel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class AbstractPanel extends HostPlugin {
2929
view: view,
3030
active: false,
3131
pinned: false,
32-
class: 'plugItIn active pb-2'
32+
class: 'plugItIn active ' + (profile.location === "sidePanel" ? 'pb-2' : ''),
3333
}
3434
}
3535

apps/remix-ide/src/app/plugins/vyper-compilation-details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class VyperCompilationDetailsPlugin extends ViewPlugin {
142142
}
143143
render() {
144144
return (
145-
<div id="compileDetails">
145+
<div className="d-flex h-100 w-100 m-0 p-5 bg-light" id="compileDetails">
146146
<PluginViewWrapper plugin={this} />
147147
</div>
148148
)

apps/remix-ide/src/remixAppManager.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ let requiredModules = [
8686
'environmentExplorer',
8787
'templateSelection',
8888
'matomo',
89-
'walletconnect'
89+
'walletconnect',
90+
'popupPanel',
91+
'remixAI',
92+
'remixAID'
9093
]
9194

9295
// dependentModules shouldn't be manually activated (e.g hardhat is activated by remixd)
@@ -415,10 +418,12 @@ class PluginLoader {
415418
'environmentExplorer',
416419
'templateSelection',
417420
'compilationDetails',
421+
'vyperCompilationDetails',
418422
'walletconnect',
419423
'dapp-draft',
420424
'solidityumlgen',
421-
'remixGuide'
425+
'remixGuide',
426+
'doc-viewer'
422427
]
423428
this.loaders = {}
424429
this.loaders.localStorage = {

apps/vyper/src/app/app.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ html, body, #root, main {
7373
justify-content: space-evenly;
7474
}
7575

76-
7776
#result nav a {
7877
padding: 0.5rem 1rem;
7978
font-size: 0.8rem;
@@ -84,13 +83,15 @@ html, body, #root, main {
8483
width: 100%;
8584
padding: 15px;
8685
overflow: auto;
86+
height: 100%;
8787
}
8888

8989
#result .tab-pane.active {
9090
height: 100%;
9191
display: flex;
9292
flex-direction: column;
9393
align-items: stretch;
94+
background-color: var(--body-bg);
9495
}
9596

9697
#result .copy {
@@ -114,8 +115,6 @@ html, body, #root, main {
114115
width: 100%;
115116
}
116117

117-
118-
119118
.remixui_copyButton {
120119
padding: 6px;
121120
font-weight: bold;
@@ -222,8 +221,6 @@ html, body, #root, main {
222221
}
223222

224223
#compileDetails {
225-
margin: 15px;
226-
padding: 15px;
227224
}
228225

229226
.cursor-status {

apps/vyper/src/app/app.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,26 +122,26 @@ const App = () => {
122122
<section>
123123
<div className="px-3 pt-3 mb-3 w-100">
124124
<CustomTooltip placement="bottom" tooltipText="Clone a repo of Vyper examples. Switch to the File Explorer to see the examples.">
125-
<Button data-id="add-repository" className="w-100 btn btn-secondary" onClick={() => {
125+
<button data-id="add-repository" className="w-100 btn border" onClick={() => {
126126
{cloneCount === 0 ? remixClient.cloneVyperRepo() : remixClient.cloneVyperRepo(cloneCount)}
127127
setCloneCount((prev) => {
128128
return ++prev
129129
})
130130
}}>
131131
Clone a repo of Vyper examples
132-
</Button>
132+
</button>
133133
</CustomTooltip>
134134
</div>
135135

136136
<Accordion className="border-0 w-100 accordion-background">
137137
<div className="border-0">
138138
<div className="">
139139
<CustomAccordionToggle eventKey="0">
140-
<label className="h6">Advanced Configurations</label>
140+
<label className="h6">Configurations</label>
141141
</CustomAccordionToggle>
142142
</div>
143143
<Accordion.Collapse eventKey="0">
144-
<div className="pt-2">
144+
<div className="pb-2 border-bottom">
145145
<Form>
146146
<div className="d-flex flex-row justify-content-around mb-1 mt-2">
147147
<div className={`custom-control custom-radio ${state.environment === 'remote' ? 'd-flex' : 'd-flex cursor-status'}`}>
@@ -185,7 +185,7 @@ const App = () => {
185185
</Accordion.Collapse>
186186
</div>
187187
</Accordion>
188-
<span className="w-100 px-3 mt-3 mb-3 small text-warning">
188+
<span className="w-100 px-3 mt-3 mb-1 small text-warning">
189189
Specify the{' '}
190190
<a className="text-warning" target="_blank" href="https://remix-ide.readthedocs.io/en/latest/vyper.html#specify-vyper-version">
191191
compiler version

apps/vyper/src/app/components/VyperResult.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function VyperResult({ output, plugin }: VyperResultProps) {
5959
return (
6060
<>
6161
<div className="d-flex justify-content-center w-100 mb-3 mt-1 vyper-panel-width flex-column">
62-
<button data-id="compilation-details" className="remixui_resultsBtn border btn-block d-block btn-block" onClick={async () => {
62+
<button data-id="compilation-details" className="remixui_resultsBtn border btn d-block btn-block" onClick={async () => {
6363
await plugin?.call('vyperCompilationDetails', 'showDetails', output)
6464
}}>
6565
<span>

libs/remix-ui/vyper-compile-details/src/lib/vyperCompile.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,14 @@ export default function VyperCompile({ result, theme, themeStyle }: VyperCompile
6565
]
6666

6767
return (
68-
<>
69-
<Tabs id="result" activeKey={active} onSelect={(key: any) => setActive(key)} justify>
68+
<div className='w-100 h-100 d-flex flex-row'>
69+
<Tabs className="flex-column" style={{height: "fit-content", backgroundColor: 'var(--body-bg)'}} id="result" activeKey={active} onSelect={(key: any) => setActive(key)}>
7070
{tabContent.map((content, index) => (
71-
<Tab eventKey={content.eventKey} title={content.tabHeadingText} as={'span'} key={`${index}-${content.eventKey}`}>
72-
<div className="d-flex flex-column w-75 justify-content-center mx-auto rounded-2">
71+
<Tab className="border-top border-left p-4 bg-light" style={{width: '50rem', height: 'fit-content', minHeight: '25rem'}} eventKey={content.eventKey} title={content.tabHeadingText} as={'span'} key={`${index}-${content.eventKey}`}>
72+
<div className="d-flex flex-column w-90 justify-content-center mx-auto rounded-2">
7373
<CopyToClipboard getContent={() => (content.eventKey !== 'abi' ? content.tabPayload : JSON.stringify(result['abi']))}>
7474
<Button
75-
variant="info"
76-
className="copy mt-3 ml-2"
75+
className="copy ml-2 btn btn-sm btn-secondary"
7776
data-id={content.eventKey === 'abi' ? 'copy-abi' : ''}
7877
>
7978
<span className="far fa-copy mr-2"></span>
@@ -97,6 +96,6 @@ export default function VyperCompile({ result, theme, themeStyle }: VyperCompile
9796
</Tab>
9897
))}
9998
</Tabs>
100-
</>
99+
</div>
101100
)
102101
}

0 commit comments

Comments
 (0)