8000 fix: copy when punctuation marks in sketch path by kittaakos · Pull Request #2045 · arduino/arduino-ide · GitHub
[go: up one dir, main page]

Skip to content

fix: copy when punctuation marks in sketch path #2045

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: white-space regression in changelog markdown
 - switched back to `react-markdown@8.0.3`,
 - spinner when module is loading

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta committed May 4, 2023
commit 45aeb7f198a0d8907b1b80157fc2d0f12b6d00cc
2 changes: 1 addition & 1 deletion arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"ps-tree": "^1.2.0",
"query-string": "^7.0.1",
"react-disable": "^0.1.1",
"react-markdown": "^6.0.3",
"react-markdown": "^8.0.0",
"react-perfect-scrollbar": "^1.5.8",
"react-select": "^5.6.0",
"react-tabs": "^3.1.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import { nls } from '@theia/core/lib/common';
import { nls } from '@theia/core/lib/common/nls';
import * as React from '@theia/core/shared/react';
import ReactMarkdown from 'react-markdown';
// @ts-expect-error see https://github.com/microsoft/TypeScript/issues/49721#issuecomment-1319854183
import type { Options } from 'react-markdown';
import { ProgressInfo, UpdateInfo } from '../../../common/protocol/ide-updater';
import ProgressBar from '../../components/ProgressBar';

const ReactMarkdown = React.lazy<React.ComponentType<Options>>(
// @ts-expect-error see above
() => import('react-markdown')
);

export interface UpdateProgress {
progressInfo?: ProgressInfo | undefined;
downloadFinished?: boolean;
Expand Down Expand Up @@ -96,17 +102,26 @@ export const IDEUpdaterComponent = ({
{changelog && (
<div className="dialogRow changelog-container">
<div className="changelog">
<ReactMarkdown
components={{
a: ({ href, children, ...props }) => (
<a onClick={() => href && openExternal(href)} {...props}>
{children}
</a>
),
}}
<React.Suspense
fallback={
<div className="fallback">
<div className="spinner" />
</div>
}
>
{changelog}
</ReactMarkdown>
<ReactMarkdown
components={{
// @ts-expect-error see imports. There is no ESM type-only import in CommonJS modules.
a: ({ href, children, ...props }) => (
<a onClick={() => href && openExternal(href)} {...props}>
{children}
</a>
),
}}
>
{changelog}
</ReactMarkdown>
</React.Suspense>
</div>
</div>
)}
Expand Down
18 changes: 18 additions & 0 deletions arduino-ide-extension/src/browser/style/ide-updater-dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
overflow: auto;
padding: 0 12px;
cursor: text;
width: 100%;
}

.ide-updater-dialog .changelog .fallback {
min-height: 180px;
width: 100%;
display: flex;
}

.ide-updater-dialog .changelog .fallback .spinner {
align-self: center;
}

.dialogContent.ide-updater-dialog
Expand Down Expand Up @@ -104,3 +115,10 @@
margin-left: 79px;
margin-right: auto;
}

/* https://github.com/arduino/arduino-ide/pull/2027#issuecomment-1533174638 */
/* https://github.com/eclipse-theia/theia/commit/1b5ff9ee459df14cedc0e8266dd02dae93fcd1bf#diff-d8d45a890507a01141c010ad4a6891edf2ae727cfa6dfe604cebbd667812cccbR68 */
/* Use normal whitespace handling for the changelog content in the update dialog. */
.p-Widget.dialogOverlay .dialogContent.ide-updater-dialog {
white-space: normal;
}
Loading
0