From: Krishan <33421343+kfiven@users.noreply.github.com> Date: Wed, 30 Mar 2022 08:12:52 +0000 (+0530) Subject: String update and file extension name consistency (#436) X-Git-Tag: v2.0.0~74 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=1a6e3e73c5dc72a2f593f32725b7e977c39227ad;p=cinny.git String update and file extension name consistency (#436) * Fixes #434 * Fixes #433 * Prtially fixes #432 * Disable auto labelling of issues * Use yaml instead of yml as recommended by yaml.org * shortened the strings * simplified option description --- diff --git a/.github/FUNDING.yaml b/.github/FUNDING.yaml new file mode 100644 index 0000000..2189f7f --- /dev/null +++ b/.github/FUNDING.yaml @@ -0,0 +1,2 @@ +open_collective: cinny +liberapay: ajbura \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 2189f7f..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -open_collective: cinny -liberapay: ajbura \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..76fc578 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,57 @@ +name: 🐞 Bug Report +description: Report a bug + +body: + - type: markdown + attributes: + value: | + ## First of all + 1. Please search for [existing issues](https://github.com/ajbura/cinny/issues?q=is%3Aissue) about this problem first. + 2. Make sure Cinny is up to date. + 3. Make sure it's an issue with Cinny and not something else you are using. + 4. Remember to be friendly. + + - type: textarea + id: description + attributes: + label: Describe the bug + description: A clear description of what the bug is. Include screenshots if applicable. + placeholder: Bug description + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: Reproduction + description: Steps to reproduce the behavior. + placeholder: | + 1. Go to ... + 2. Click on ... + 3. See error + + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: A clear description of what you expected to happen. + + - type: textarea + id: info + attributes: + label: Platform and versions + description: "Provide OS, browser and Cinny version with your Homeserver." + placeholder: | + 1. OS: [e.g. Windows 10, MacOS] + 2. Browser: [e.g. chrome 99.5, firefox 97.2] + 3. Cinny version: [e.g. 1.8.1 (app.cinny.in)] + 4. Matrix homeserver: [e.g. matrix.org] + render: shell + validations: + required: true + + - type: textarea + id: context + attributes: + label: Additional context + description: Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index f3f6ef3..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: 🐞 Bug Report -description: Report a bug -labels: 'type: bug' - -body: - - type: markdown - attributes: - value: | - ## First of all - 1. Please search for [existing issues](https://github.com/ajbura/cinny/issues?q=is%3Aissue) about this problem first. - 2. Make sure Cinny is up to date. - 3. Make sure it's an issue with Cinny and not something else you are using. - 4. Remember to be friendly. - - - type: textarea - id: description - attributes: - label: Describe the bug - description: A clear description of what the bug is. Include screenshots if applicable. - placeholder: Bug description - validations: - required: true - - - type: textarea - id: reproduction - attributes: - label: Reproduction - description: Steps to reproduce the behavior. - placeholder: | - 1. Go to ... - 2. Click on ... - 3. See error - - - type: textarea - id: expected-behavior - attributes: - label: Expected behavior - description: A clear description of what you expected to happen. - - - type: textarea - id: info - attributes: - label: Platform and versions - description: "Provide OS, browser and Cinny version with your Homeserver." - placeholder: | - 1. OS: [e.g. Windows 10, MacOS] - 2. Browser: [e.g. chrome 99.5, firefox 97.2] - 3. Cinny version: [e.g. 1.8.1 (app.cinny.in)] - 4. Matrix homeserver: [e.g. matrix.org] - render: shell - validations: - required: true - - - type: textarea - id: context - attributes: - label: Additional context - description: Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 0000000..91ba4f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1,4 @@ +contact_links: + - name: 💬 Matrix Chat + url: https://matrix.to/#/#cinny:matrix.org + about: Ask questions and talk to other Cinny users and the maintainers diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 91ba4f0..0000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -contact_links: - - name: 💬 Matrix Chat - url: https://matrix.to/#/#cinny:matrix.org - about: Ask questions and talk to other Cinny users and the maintainers diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..412d518 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,33 @@ +name: 💡 Feature Request +description: Suggest an idea + +body: + - type: textarea + id: problem + attributes: + label: Describe the problem + description: A clear description of the problem this feature would solve + placeholder: "I'm always frustrated when..." + validations: + required: true + + - type: textarea + id: solution + attributes: + label: "Describe the solution you'd like" + description: A clear description of what change you would like + placeholder: "I would like to..." + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: "Any alternative solutions you've considered" + + - type: textarea + id: context + attributes: + label: Additional context + description: Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index 7026f95..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: 💡 Feature Request -description: Suggest an idea -labels: 'type: feature' - -body: - - type: textarea - id: problem - attributes: - label: Describe the problem - description: A clear description of the problem this feature would solve - placeholder: "I'm always frustrated when..." - validations: - required: true - - - type: textarea - id: solution - attributes: - label: "Describe the solution you'd like" - description: A clear description of what change you would like - placeholder: "I would like to..." - validations: - required: true - - - type: textarea - id: alternatives - attributes: - label: Alternatives considered - description: "Any alternative solutions you've considered" - - - type: textarea - id: context - attributes: - label: Additional context - description: Add any other context about the problem here. diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..f49eabc --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,28 @@ +# Docs: + +version: 2 + +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: "tuesday" + time: "01:00" + timezone: "Asia/Kolkata" + + - package-ecosystem: docker + directory: / + schedule: + interval: weekly + day: "tuesday" + time: "01:00" + timezone: "Asia/Kolkata" + + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + day: "tuesday" + time: "01:00" + timezone: "Asia/Kolkata" diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 63e94ac..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Docs: - -version: 2 - -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: weekly - day: "tuesday" - time: "01:00" - timezone: "Asia/Kolkata" - - - package-ecosystem: docker - directory: / - schedule: - interval: weekly - day: "tuesday" - time: "01:00" - timezone: "Asia/Kolkata" - - - package-ecosystem: npm - directory: / - schedule: - interval: weekly - day: "tuesday" - time: "01:00" - timezone: "Asia/Kolkata" diff --git a/.github/workflows/build-pull-request.yaml b/.github/workflows/build-pull-request.yaml new file mode 100644 index 0000000..71c7851 --- /dev/null +++ b/.github/workflows/build-pull-request.yaml @@ -0,0 +1,39 @@ +name: 'Build pull request' + +on: + pull_request: + types: ['opened', 'synchronize'] + +jobs: + build-pull-request: + runs-on: ubuntu-latest + env: + PR_NUMBER: ${{github.event.number}} + steps: + - name: Checkout repository + uses: actions/checkout@v3.0.0 + - name: Build app + run: npm ci && npm run build + - name: Upload artifact + uses: actions/upload-artifact@v3.0.0 + with: + name: previewbuild + path: dist + retention-days: 1 + - name: Get PR info + uses: actions/github-script@v6.0.0 + with: + script: | + var fs = require('fs'); + fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request)); + - name: Upload PR Info + uses: actions/upload-artifact@v3.0.0 + with: + name: pr.json + path: pr.json + retention-days: 1 + - name: Build Docker image + uses: docker/build-push-action@v2.10.0 + with: + context: . + push: false diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml deleted file mode 100644 index 71c7851..0000000 --- a/.github/workflows/build-pull-request.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: 'Build pull request' - -on: - pull_request: - types: ['opened', 'synchronize'] - -jobs: - build-pull-request: - runs-on: ubuntu-latest - env: - PR_NUMBER: ${{github.event.number}} - steps: - - name: Checkout repository - uses: actions/checkout@v3.0.0 - - name: Build app - run: npm ci && npm run build - - name: Upload artifact - uses: actions/upload-artifact@v3.0.0 - with: - name: previewbuild - path: dist - retention-days: 1 - - name: Get PR info - uses: actions/github-script@v6.0.0 - with: - script: | - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/pr.json', JSON.stringify(context.payload.pull_request)); - - name: Upload PR Info - uses: actions/upload-artifact@v3.0.0 - with: - name: pr.json - path: pr.json - retention-days: 1 - - name: Build Docker image - uses: docker/build-push-action@v2.10.0 - with: - context: . - push: false diff --git a/.github/workflows/deploy-pull-request.yaml b/.github/workflows/deploy-pull-request.yaml new file mode 100644 index 0000000..6894bad --- /dev/null +++ b/.github/workflows/deploy-pull-request.yaml @@ -0,0 +1,78 @@ +name: Upload Preview Build to Netlify +on: + workflow_run: + workflows: ["Build pull request"] + types: + - completed +jobs: + get-build-and-deploy: + runs-on: ubuntu-latest + if: > + ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + # There's a 'download artifact' action but it hasn't been updated for the + # workflow_run action (https://github.com/actions/download-artifact/issues/60) + # so instead we get this mess: + - name: Download artifact + uses: actions/github-script@v6.0.0 + with: + script: | + var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{github.event.workflow_run.id }}, + }); + var matchArtifact = artifacts.data.artifacts.filter((artifact) => { + return artifact.name == "previewbuild" + })[0]; + var download = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', + }); + var fs = require('fs'); + fs.writeFileSync('${{github.workspace}}/previewbuild.zip', Buffer.from(download.data)); + var prInfoArtifact = artifacts.data.artifacts.filter((artifact) => { + return artifact.name == "pr.json" + })[0]; + var download = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: prInfoArtifact.id, + archive_format: 'zip', + }); + var fs = require('fs'); + fs.writeFileSync('${{github.workspace}}/pr.json.zip', Buffer.from(download.data)); + - name: Extract Artifacts + run: unzip -d dist previewbuild.zip && rm previewbuild.zip && unzip pr.json.zip && rm pr.json.zip + - name: Read PR Info + id: readctx + uses: actions/github-script@v6.0.0 + with: + script: | + var fs = require('fs'); + var pr = JSON.parse(fs.readFileSync('${{github.workspace}}/pr.json')); + console.log(`::set-output name=prnumber::${pr.number}`); + - name: Deploy to Netlify + id: netlify + uses: nwtgck/actions-netlify@v1.2.3 + with: + publish-dir: dist + deploy-message: "Deploy from GitHub Actions" + # These don't work because we're in workflow_run + enable-pull-request-comment: false + enable-commit-comment: false + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE3_ID }} + timeout-minutes: 1 + - name: Edit PR Description + uses: velas/pr-description@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + pull-request-number: ${{ steps.readctx.outputs.prnumber }} + description-message: | + Preview: ${{ steps.netlify.outputs.deploy-url }} + ⚠️ Exercise caution. Use test accounts. ⚠️ diff --git a/.github/workflows/deploy-pull-request.yml b/.github/workflows/deploy-pull-request.yml deleted file mode 100644 index 6894bad..0000000 --- a/.github/workflows/deploy-pull-request.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Upload Preview Build to Netlify -on: - workflow_run: - workflows: ["Build pull request"] - types: - - completed -jobs: - get-build-and-deploy: - runs-on: ubuntu-latest - if: > - ${{ github.event.workflow_run.conclusion == 'success' }} - steps: - # There's a 'download artifact' action but it hasn't been updated for the - # workflow_run action (https://github.com/actions/download-artifact/issues/60) - # so instead we get this mess: - - name: Download artifact - uses: actions/github-script@v6.0.0 - with: - script: | - var artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "previewbuild" - })[0]; - var download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/previewbuild.zip', Buffer.from(download.data)); - var prInfoArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "pr.json" - })[0]; - var download = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: prInfoArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/pr.json.zip', Buffer.from(download.data)); - - name: Extract Artifacts - run: unzip -d dist previewbuild.zip && rm previewbuild.zip && unzip pr.json.zip && rm pr.json.zip - - name: Read PR Info - id: readctx - uses: actions/github-script@v6.0.0 - with: - script: | - var fs = require('fs'); - var pr = JSON.parse(fs.readFileSync('${{github.workspace}}/pr.json')); - console.log(`::set-output name=prnumber::${pr.number}`); - - name: Deploy to Netlify - id: netlify - uses: nwtgck/actions-netlify@v1.2.3 - with: - publish-dir: dist - deploy-message: "Deploy from GitHub Actions" - # These don't work because we're in workflow_run - enable-pull-request-comment: false - enable-commit-comment: false - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE3_ID }} - timeout-minutes: 1 - - name: Edit PR Description - uses: velas/pr-description@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - pull-request-number: ${{ steps.readctx.outputs.prnumber }} - description-message: | - Preview: ${{ steps.netlify.outputs.deploy-url }} - ⚠️ Exercise caution. Use test accounts. ⚠️ diff --git a/.github/workflows/netlify-dev.yaml b/.github/workflows/netlify-dev.yaml index d1100eb..5a71fcd 100644 --- a/.github/workflows/netlify-dev.yaml +++ b/.github/workflows/netlify-dev.yaml @@ -10,7 +10,7 @@ jobs: name: 'Deploy' runs-on: ubuntu-latest - steps: + steps: - name: Checkout repository uses: actions/checkout@v3.0.0 - name: Build and deploy to Netlify diff --git a/src/app/molecules/room-history-visibility/RoomHistoryVisibility.jsx b/src/app/molecules/room-history-visibility/RoomHistoryVisibility.jsx index 766f765..6a72a99 100644 --- a/src/app/molecules/room-history-visibility/RoomHistoryVisibility.jsx +++ b/src/app/molecules/room-history-visibility/RoomHistoryVisibility.jsx @@ -17,19 +17,19 @@ const visibility = { const items = [{ iconSrc: null, - text: 'World readable (anyone can read)', + text: 'Anyone (including guests)', type: visibility.WORLD_READABLE, }, { iconSrc: null, - text: 'Member shared (since the point in time of selecting this option)', + text: 'Members (all messages)', type: visibility.SHARED, }, { iconSrc: null, - text: 'Member invited (since they were invited)', + text: 'Members (messages after invite)', type: visibility.INVITED, }, { iconSrc: null, - text: 'Member joined (since they joined)', + text: 'Members (messages after join)', type: visibility.JOINED, }]; @@ -87,7 +87,7 @@ function RoomHistoryVisibility({ roomId }) { )) } - Changes to who can read history will only apply to future messages in this room. The visibility of existing history will be unchanged. + Changes to history visibility will only apply to future messages. The visibility of existing history will have no effect. ); } diff --git a/src/app/organisms/create-room/CreateRoom.jsx b/src/app/organisms/create-room/CreateRoom.jsx index ac344b0..15be02d 100644 --- a/src/app/organisms/create-room/CreateRoom.jsx +++ b/src/app/organisms/create-room/CreateRoom.jsx @@ -210,7 +210,7 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) { /> )} content={( - Founder (101) override the default Admin (100) power level. + Selecting Admin sets 100 power level whereas Founder sets 101. )} /> diff --git a/src/app/organisms/room/RoomSettings.jsx b/src/app/organisms/room/RoomSettings.jsx index bd083c1..0fb2722 100644 --- a/src/app/organisms/room/RoomSettings.jsx +++ b/src/app/organisms/room/RoomSettings.jsx @@ -123,7 +123,7 @@ function SecuritySettings({ roomId }) {
- Message history visibility (Who can read history) + Message history visibility
diff --git a/src/app/organisms/room/RoomViewContent.jsx b/src/app/organisms/room/RoomViewContent.jsx index dd77e98..96839b2 100644 --- a/src/app/organisms/room/RoomViewContent.jsx +++ b/src/app/organisms/room/RoomViewContent.jsx @@ -63,7 +63,7 @@ function genRoomIntro(mEvent, roomTimeline) { avatarSrc={avatarSrc} name={roomTimeline.room.name} heading={`Welcome to ${roomTimeline.room.name}`} - desc={`This is the beginning of ${roomTimeline.room.name} room.${typeof roomTopic !== 'undefined' ? (` Topic: ${roomTopic}`) : ''}`} + desc={`This is the beginning of the ${roomTimeline.room.name} room.${typeof roomTopic !== 'undefined' ? (` Topic: ${roomTopic}`) : ''}`} time={mEvent ? `Created at ${dateFormat(mEvent.getDate(), 'dd mmmm yyyy, hh:MM TT')}` : null} /> );