Skip to content

Commit

Permalink
Merge branch 'asyncapi:master' into doc/introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
Jagrutiti authored Oct 19, 2023
2 parents 26a14ec + 223fa22 commit 8def3f9
Show file tree
Hide file tree
Showing 20 changed files with 1,014 additions and 356 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/issues-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Monthly issue metrics
on:
workflow_dispatch:
schedule:
- cron: '3 2 1 * *'

permissions:
issues: write
pull-requests: read

jobs:
build:
name: issue metrics
runs-on: ubuntu-latest

steps:

- name: Get dates for last month
shell: bash
run: |
# Calculate the first day of the previous month
first_day=$(date -d "last month" +%Y-%m-01)
# Calculate the last day of the previous month
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
#Set an environment variable with the date range
echo "$first_day..$last_day"
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
- name: Run issue-metrics tool
uses: github/issue-metrics@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEARCH_QUERY: 'repo:shapeitapp/shapeitapp created:${{ env.last_month }}'

- name: Create issue
uses: peter-evans/create-issue-from-file@v4
with:
title: Monthly issue metrics report
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./issue_metrics.md
assignees: Amzani
76 changes: 76 additions & 0 deletions apps/design-system/src/components/ChipInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { useState } from "react";
import { ChipInput } from "@asyncapi/studio-ui";

const meta = {
component: ChipInput,
parameters: {
layout: 'fullscreen',
backgrounds: {
default: 'light'
}
},
};

export default meta;

export const Default = () => {
const [currentChips, setCurrentChips] = useState<string[]>([]);

return (
<div className="p-4 bg-gray-100 flex items-center">
<ChipInput
name="chip-input-default"
id="chip-input-id-default"
chips={currentChips}
onChange={setCurrentChips}
/>
</div>
);
};

export const WithTags = () => {
const [currentChips, setCurrentChips] = useState<string[]>(['production', 'platform']);

return (
<div className="p-4 bg-gray-100 flex items-center">
<ChipInput
name="chip-input-chip-text"
id="chip-input-id-chip-text"
chips={currentChips}
onChange={setCurrentChips}
/>
</div>
);
};

export const WithSomeDefaultText = () => {
const [currentChips, setCurrentChips] = useState<string[]>(['production', 'platform']);

return (
<div className="p-4 bg-gray-100 flex items-center">
<ChipInput
name="chip-input-default-text-in-input"
id="chip-input-id-default-text-in-input"
chips={currentChips}
onChange={setCurrentChips}
defaultValue="registr"
/>
</div>
);
};

export const WithCustomPlaceholder = () => {
const [currentChips, setCurrentChips] = useState<string[]>([]);

return (
<div className="p-4 bg-gray-100 flex items-center">
<ChipInput
name="chip-input-custom-placeholder"
id="chip-input-id-placeholder"
chips={currentChips}
onChange={setCurrentChips}
placeholder="Enter a custom chip"
/>
</div>
);
};
2 changes: 1 addition & 1 deletion apps/studio-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"eslint": "8.46.0",
"eslint-config-next": "13.4.12",
"next": "13.4.12",
"postcss": "8.4.27",
"postcss": "8.4.31",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.3",
Expand Down
6 changes: 6 additions & 0 deletions apps/studio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @asyncapi/studio

## 0.19.1

### Patch Changes

- 9187c17: fix studio breaking when trying to generate code/document

## 0.19.0

### Minor Changes
Expand Down
16 changes: 8 additions & 8 deletions apps/studio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/studio",
"version": "0.19.0",
"version": "0.19.1",
"private": true,
"description": "One place that allows you to develop an AsyncAPI document, validate it, convert it to the latest version, preview the documentation and visualize the events flow.",
"license": "Apache-2.0",
Expand All @@ -26,8 +26,8 @@
"@asyncapi/avro-schema-parser": "^3.0.2",
"@asyncapi/converter": "^1.3.1",
"@asyncapi/openapi-schema-parser": "^3.0.4",
"@asyncapi/parser": "^2.1.0-next-major-spec.5",
"@asyncapi/react-component": "^1.0.0-next.54",
"@asyncapi/parser": "^3.0.0-next-major-spec.3",
"@asyncapi/react-component": "^1.0.2",
"@asyncapi/specs": "^6.0.0-next-major-spec.6",
"@ebay/nice-modal-react": "^1.2.10",
"@headlessui/react": "^1.7.4",
Expand Down Expand Up @@ -75,13 +75,13 @@
},
"devDependencies": {
"@asyncapi/dotnet-nats-template": "^0.12.1",
"@asyncapi/go-watermill-template": "^0.2.40",
"@asyncapi/go-watermill-template": "^0.2.42",
"@asyncapi/html-template": "^0.28.4",
"@asyncapi/java-spring-cloud-stream-template": "^0.13.4",
"@asyncapi/java-spring-template": "^1.0.0",
"@asyncapi/java-spring-template": "^1.4.0",
"@asyncapi/java-template": "^0.2.1",
"@asyncapi/markdown-template": "^1.3.3",
"@asyncapi/nodejs-template": "^0.13.3",
"@asyncapi/markdown-template": "^1.4.0",
"@asyncapi/nodejs-template": "^1.0.0",
"@asyncapi/nodejs-ws-template": "^0.9.33",
"@asyncapi/python-paho-template": "^0.2.13",
"@asyncapi/ts-nats-template": "^0.10.3",
Expand Down Expand Up @@ -110,7 +110,7 @@
"https-browserify": "^1.0.0",
"markdown-toc": "^1.2.0",
"path-browserify": "^1.0.1",
"postcss": "^8.4.19",
"postcss": "^8.4.31",
"process": "^0.11.10",
"raw-loader": "^4.0.2",
"react-scripts": "5.0.1",
Expand Down
7 changes: 5 additions & 2 deletions apps/studio/src/components/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import SplitPane from './SplitPane';
import { Editor } from './Editor/Editor';
import { Navigation } from './Navigation';
import { Navigationv3 } from './Navigationv3';
import { Template } from './Template';
import { VisualiserTemplate } from './Visualiser';

Expand All @@ -16,7 +17,7 @@ export const Content: FunctionComponent<ContentProps> = () => { // eslint-disabl
const document = useDocumentsState(state => state.documents['asyncapi']?.document) || null;
const v3Enabled = useSettingsState(state => state.editor.v3support) || false;
const isV3 = document?.version() === '3.0.0' && v3Enabled;
const navigationEnabled = isV3 ? false : show.primarySidebar;
const navigationEnabled = show.primarySidebar;
const editorEnabled = show.primaryPanel;
const viewEnabled = show.secondaryPanel;
const viewType = secondaryPanelType;
Expand All @@ -42,7 +43,9 @@ export const Content: FunctionComponent<ContentProps> = () => { // eslint-disabl
localStorage.setItem(splitPosLeft, String(size));
}, 100)}
>
<Navigation />
{
isV3 ? <Navigationv3 /> : <Navigation />
}
<Editor />
</SplitPane>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const TemplateParametersSans: ForwardRefRenderFunction<TemplateParameters
const servers = document?.servers();
const availableServers: string[] = [];
Object.entries(servers || {}).forEach(([serverName, server]) => {
if (supportedProtocols.includes(server.protocol())) availableServers.push(serverName);
if (server.protocol && supportedProtocols.includes(server.protocol())) availableServers.push(serverName);
});

if (supportedProtocols.length && availableServers.length === 0) {
Expand Down
Loading

0 comments on commit 8def3f9

Please sign in to comment.