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

Fix sidebar's color #990

Merged
merged 7 commits into from
Mar 26, 2024
Merged

Conversation

helios2003
Copy link
Contributor

Description

The sidebar's color remains the same as the original color even when the error message is displayed.
image

Related issue(s)
Fixes #989

Copy link

changeset-bot bot commented Mar 7, 2024

⚠️ No Changeset found

Latest commit: 10892d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Copy link

netlify bot commented Mar 7, 2024

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
🔨 Latest commit 10892d8
🔍 Latest deploy log https://app.netlify.com/sites/modest-rosalind-098b67/deploys/6602dd278356d50008f739c0
😎 Deploy Preview https://deploy-preview-990--modest-rosalind-098b67.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 7, 2024

Deploy Preview for asyncapi-studio-design-system ready!

Name Link
🔨 Latest commit 10892d8
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-studio-design-system/deploys/6602dd27587a8b00089fa85e
😎 Deploy Preview https://deploy-preview-990--asyncapi-studio-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

princerajpoot20
princerajpoot20 previously approved these changes Mar 7, 2024
Copy link
Member

@princerajpoot20 princerajpoot20 left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀 Thanks for your first PR

Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for studio-next ready!

Name Link
🔨 Latest commit 10892d8
🔍 Latest deploy log https://app.netlify.com/sites/studio-next/deploys/6602dd2702fd7200099383fc
😎 Deploy Preview https://deploy-preview-990--studio-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Amzani
Amzani previously approved these changes Mar 14, 2024
Copy link
Collaborator

@Amzani Amzani left a comment

Choose a reason for hiding this comment

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

LGTM

@Amzani
Copy link
Collaborator

Amzani commented Mar 14, 2024

/rtm

@asyncapi-bot
Copy link
Contributor

Hello, @Amzani! 👋🏼
This PR is not up to date with the base branch and can't be merged.
Please update your branch manually with the latest version of the base branch.
PRO-TIP: Add a comment to your PR with the text: /au or /autoupdate and our bot will take care of updating the branch in the future. The only requirement for this to work is to enable Allow edits from maintainers option in your PR.
Thanks 😄

@Amzani
Copy link
Collaborator

Amzani commented Mar 15, 2024

@helios2003
Copy link
Contributor Author

Sure @Amzani, I will try resolving it.

@helios2003
Copy link
Contributor Author

Hi @Amzani, from what I understand I need to refactor the last 46 lines in apps/studio-next/src/state/files.state.ts. Is that right?

@princerajpoot20
Copy link
Member

@helios2003 , the file apps/studio-next/src/state/files.state.ts contains a duplicate line of code.
Pinging @Shurtu-gal : could you assist @helios2003 in fixing this as you have recently pushed this.

@Shurtu-gal
Copy link
Collaborator

The problem is that the following lines are the same and it should be as we want to introduce minimal changes while migrating. At least the states are fine as it is.

export interface FileStat {
mtime: number;
}
export type File = {
uri: string;
name: string;
content: string;
from: 'storage' | 'url' | 'base64';
source?: string;
language: 'json' | 'yaml';
modified: boolean;
stat?: FileStat;
}
export type FilesState = {
files: Record<string, File>;
}
export type FilesActions = {
updateFile: (uri: string, file: Partial<File>) => void;
}
export const filesState = create<FilesState & FilesActions>(set => ({
files: {
asyncapi: {
uri: 'asyncapi',
name: 'asyncapi',
content: schema,
from: 'storage',
source: undefined,
language: schema.trimStart()[0] === '{' ? 'json' : 'yaml',
modified: false,
stat: {
mtime: (new Date()).getTime(),
}
}
},
updateFile(uri: string, file: Partial<File>) {
set(state => ({ files: { ...state.files, [String(uri)]: { ...state.files[String(uri)] || {}, ...file } } }));
}
}));
export const useFilesState = filesState;

export interface FileStat {
mtime: number;
}
export type File = {
uri: string;
name: string;
content: string;
from: 'storage' | 'url' | 'base64';
source?: string;
language: 'json' | 'yaml';
modified: boolean;
stat?: FileStat;
}
export type FilesState = {
files: Record<string, File>;
}
export type FilesActions = {
updateFile: (uri: string, file: Partial<File>) => void;
}
export const filesState = create<FilesState & FilesActions>(set => ({
files: {
asyncapi: {
uri: 'asyncapi',
name: 'asyncapi',
content: schema,
from: 'storage',
source: undefined,
language: schema.trimStart()[0] === '{' ? 'json' : 'yaml',
modified: false,
stat: {
mtime: (new Date()).getTime(),
}
}
},
updateFile(uri: string, file: Partial<File>) {
set(state => ({ files: { ...state.files, [String(uri)]: { ...state.files[String(uri)] || {}, ...file } } }));
}
}));
export const useFilesState = filesState;

@Amzani is there any way this rule can be disabled 🤔

@Amzani
Copy link
Collaborator

Amzani commented Mar 18, 2024

@helios2003 @Shurtu-gal as we are migrating code to studio-next we can add studio-next directory in .sonarcloud.properties / sonar.cpd.exclusions

@helios2003
Copy link
Contributor Author

@Shurtu-gal should I add this as a part of the PR or the change should be done by the maintainer itself?

@Shurtu-gal
Copy link
Collaborator

You can do it in this PR itself.

@helios2003
Copy link
Contributor Author

@Amzani, @Shurtu-gal the changes have been made.

@Shurtu-gal
Copy link
Collaborator

@Amzani, @Shurtu-gal the changes have been made.

Great!! Thanks 🤗

Copy link
Member

@princerajpoot20 princerajpoot20 left a comment

Choose a reason for hiding this comment

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

Great work! @helios2003

@KhudaDad414
Copy link
Member

@Amzani @Shurtu-gal what about adding studio to the Sonar exception list? Since studio-next is going to see a lot of activity and by ignoring duplicates in studio we can make sure the studio-next is duplicate free.

@Shurtu-gal
Copy link
Collaborator

@KhudaDad414 it is already there I believe.

@helios2003
Copy link
Contributor Author

Maintainers, if the PR is fine, can it be merged?

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@princerajpoot20 princerajpoot20 left a comment

Choose a reason for hiding this comment

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

LGTM

@Shurtu-gal
Copy link
Collaborator

/rtm

Copy link
Collaborator

@Amzani Amzani left a comment

Choose a reason for hiding this comment

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

LGTM

@KhudaDad414
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit a04a005 into asyncapi:master Mar 26, 2024
27 checks passed
@KhudaDad414
Copy link
Member

this PR did not result in a release because it did not contain a changeset. #990 (comment)

@Amzani now I understand your frustration. 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Abrupt change in the color of the Navigation sidebar
6 participants