Skip to content
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

Updated the Toggling feature of the ariaExpanded #29

Merged
merged 1 commit into from
Dec 24, 2023
Merged
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
18 changes: 7 additions & 11 deletions web-app/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ li {
#editorwrapper {
display: flex;
justify-content: space-between;
width: 92vw;
height: 83vh;
}

.tabswrapper {
Expand Down Expand Up @@ -268,14 +266,12 @@ li {
transition: ease-in-out .5s;
}

#searcharea {
display: none;
}

#filepioneerarea {
.sidebarscontent{
display: none;
width: 20vw;
height: 90vh;
background-color: var(--main-bg-color);
color: white;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}

#extensions {
display: none;
}
35 changes: 23 additions & 12 deletions web-app/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,29 @@ import Search from "./components/SideBar/Main Components/Search/Search.jsx";
import Extensions from "./components/SideBar/Main Components/Extensions/Extensions.jsx";
import FilePioneer from "./components/SideBar/Main Components/filePioneer/filePioneer.jsx";


function App() {
let editorwrapper = document.getElementById('editorwrapper')
let [display, changedisplay] = useState('none');
let [ariaExpandedisplay, changeariaExpandedisplay] = useState('none');
const toggleAriaExpanded = () => {
console.log("clicked");
if (display === "none") {
if (ariaExpandedisplay === "none") {
// console.log("toggled")
changedisplay("flex");
editorwrapper.style.width = "72vw"
changeariaExpandedisplay("flex");
seteditorwrapperStyle({
width: '72vw',
})

} else {
changedisplay("none");
editorwrapper.style.width = "92vw"
changeariaExpandedisplay("none");
seteditorwrapperStyle({
width: '92vw',
})
}
};
const [editorwrapperStyle, seteditorwrapperStyle] = useState({
width: '92vw',
height: '83vh'
})
return (
<>
<MenuBar />
Expand All @@ -32,14 +41,16 @@ function App() {
<ReviewBar />
<div className="maincodearea">
<Tabs />
<MonacoEditor/>
<MonacoEditor editorwrapperStyle={editorwrapperStyle} />
</div>
</div>
<div className="SideBarmainwrper">
<Extensions />
<Search />
<FilePioneer ariaExpanded={display} />
<SideBar toggleAriaExpanded={toggleAriaExpanded} />
<div className="SideBarmainwrper" ariaExpanded={ariaExpandedisplay}>
<Extensions />
<Search />
<FilePioneer />
<SideBar toggleAriaExpanded={toggleAriaExpanded} />
</div>
</div>
</div>
<StatusBar />
Expand Down
2 changes: 1 addition & 1 deletion web-app/src/components/Editor/MonacoEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Editor } from '@monaco-editor/react';
function MonacoEditor(props) {
return (
<>
<div id="editorwrapper">
<div id="editorwrapper" style={props.editorwrapperStyle}>
<Editor
theme='vs-dark'
defaultLanguage='python'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'

const GitHub = () => {
return (
<div id="github" className='sidebarscontent'>
<h6>File Pioneer</h6>
<div id="github" className=''>
<h6>GitHub</h6>
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react'

const Search = () => {
const Search = (props) => {
return (
<div id="searcharea" className='sidebarscontent'>
<div id="searcharea" className='d-none'>
<h6>Search</h6>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, {useState} from 'react'
function FilePioneer(props) {

return (
<div id="filepioneerarea" className={`d-${props.ariaExpanded}`}>
<div id="filepioneerarea" className='d-none'>
<h6>File Pioneer</h6>
</div>
)
Expand Down
12 changes: 6 additions & 6 deletions web-app/src/components/SideBar/SideBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,42 @@ export default function SideBar(props) {
<span className="sidebarIconBar"></span>
</div>
<div className="iconWrapper">
<div id="search" className="sidebaricons">
<div id="search" className="sidebaricons" onClick={props.toggleAriaExpanded}>
<i className="fa-solid fa-magnifying-glass fa-xl"></i>
</div>
<span className="sidebarIconBar"></span>
</div>

<div className="iconWrapper">
<div id="terminal" className="sidebaricons" aria-expanded={false}>
<div id="terminal" className="sidebaricons" onClick={props.toggleAriaExpanded}>
<i className="fa-solid fa-terminal fa-xl"></i>
</div>
<span className="sidebarIconBar"></span>
</div>

<div className="iconWrapper">
<div id="debug" className="sidebaricons" aria-expanded={false}>
<div id="debug" className="sidebaricons" onClick={props.toggleAriaExpanded}>
<i className="fa-solid fa-bug-slash fa-xl"></i>
</div>
<span className="sidebarIconBar"></span>
</div>

<div className="iconWrapper">
<div id="git" className="sidebaricons" aria-expanded={false}>
<div id="git" className="sidebaricons" onClick={props.toggleAriaExpanded}>
<i className="fa-brands fa-git-alt fa-xl"></i>
</div>
<span className="sidebarIconBar"></span>
</div>

<div className="iconWrapper">
<div id="github" className="sidebaricons" aria-expanded={false}>
<div id="github" className="sidebaricons" onClick={props.toggleAriaExpanded}>
<i className="fa-brands fa-github fa-xl"></i>
</div>
<span className="sidebarIconBar"></span>
</div>

<div className="iconWrapper">
<div id="codeblocks" className="sidebaricons" aria-expanded={false}>
<div id="codeblocks" className="sidebaricons" onClick={props.toggleAriaExpanded}>
<i className="fa-solid fa-puzzle-piece fa-xl"></i>
</div>
<span className="sidebarIconBar"></span>
Expand Down