Skip to content

Fix(GUI) Stretched Logo on Mobile and Safari #86

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

31 changes: 17 additions & 14 deletions src/ConcertoEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,28 @@ export default function ConcertoEditor( {value, onChange} : {value: string, onCh
}, [error]);
useEffect(() => {
let model = monacoEditor?.editor.getModels()[0];
if (ctoErr && monacoEditor) {
if (ctoErr && monacoEditor && model) {
const match = ctoErr.match(/Line (\d+) column (\d+)/);

const lineNumber = parseInt(match[1]);
const columnNumber = parseInt(match[2]) ;
monacoEditor?.editor.setModelMarkers(model, "customMarker", [
{
startLineNumber: lineNumber,
startColumn: columnNumber - 1,
endLineNumber: lineNumber,
endColumn: columnNumber + 1,
message: ctoErr,
severity: MarkerSeverity.Error,
},
]);
if (match) {
const lineNumber = parseInt(match[1]);
const columnNumber = parseInt(match[2]);
monacoEditor?.editor.setModelMarkers(model, "customMarker", [
{
startLineNumber: lineNumber,
startColumn: columnNumber - 1,
endLineNumber: lineNumber,
endColumn: columnNumber + 1,
message: ctoErr,
severity: MarkerSeverity.Error,
},
]);
} else {
monacoEditor?.editor.setModelMarkers(model, "customMarker", []);
monacoEditor?.editor.setModelMarkers(model, "customMarker", []);
}
}
}, [ctoErr,monacoEditor]);

function handleEditorWillMount(monaco:monaco.Monaco) {
monaco.languages.register({
id: 'concerto',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function Navbar({ scrollToExplore }: { scrollToExplore: any }) {
preview={false}
style={{
paddingRight: screens.md ? "1.5em" : "10px",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay @nitro56565 can you change this: 1.5em in the paddingRight, to the equivalent of 24 pixels from the base format 16px.

so change 1.5em to 24px to ensure consistency here!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright I'll do that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vinyl-Davyl done with these changes

height: "26px",
height: "26px", maxWidth: screens.md ? '184.17px' : '36.67px',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for now. @Vinyl-Davyl @nitro56565 can we please look into having a consistent unit for styles, we are using em, px both. Let's please fix this as well.

}}
/>
<span style={{ color: "white" }}>Template Playground</span>
Expand Down
Loading