Giter Site home page Giter Site logo

v-ngu / backstage-plugin-bulletin-board Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 8.0 1.91 MB

Bulletin Board is a Backstage plugin that allows you to share interesting ideas, news and links with your teammates.

License: MIT License

JavaScript 5.96% TypeScript 94.04%
backstage backstage-plugin

backstage-plugin-bulletin-board's People

Contributors

github-actions[bot] avatar v-ngu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

backstage-plugin-bulletin-board's Issues

bulletin plugin not supporting backstage version 1.20.2

Earlier, i had backstage 1.17.5 installed, also I was using the newest version of bulletin plugin but after upgrading backstage to 1.20.2 version, it is giving error on docker image build, With new backstage version we have required node version greater than 16.

Error:

yarn run v1.22.19
$ tsc
packages/backend/src/plugins/bulletin-board.ts:11:5 - error TS2322: Type 'import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/@backstage/backend-plugin-api/dist/index").DatabaseService' is not assignable to type 'import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/backstage-plugin-bulletin-board-backend/node_modules/@backstage/backend-plugin-api/dist/index").DatabaseService'.
  The types returned by 'getClient()' are incompatible between these types.
    Type 'Promise<import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/knex/types/index").Knex<any, any[]>>' is not assignable to type 'Promise<import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/backstage-plugin-bulletin-board-backend/node_modules/@backstage/backend-plugin-api/node_modules/knex/types/index").Knex<any, any[]>>'.
      Type 'import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/knex/types/index").Knex<any, any[]>' is not assignable to type 'import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/backstage-plugin-bulletin-board-backend/node_modules/@backstage/backend-plugin-api/node_modules/knex/types/index").Knex<any, any[]>'.
        The types of 'raw(...).transacting' are incompatible between these types.
          Type '(trx: import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/knex/types/index").Knex.Transaction<any, any[]>) => import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/knex/types/index").Knex.Raw<any>' is not assignable to type '(trx: import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/backstage-plugin-bulletin-board-backend/node_modules/@backstage/backend-plugin-api/node_modules/knex/types/index").Knex.Transaction<any, any[]>) => import("/home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/no...'.
            Types of parameters 'trx' and 'trx' are incompatible.
              Type 'Transaction<any, any[]>' is missing the following properties from type 'Transaction<any, any[]>': comment, except, havingNull, havingNotNull, updateFrom

11     database: env.database,
       ~~~~~~~~

  node_modules/backstage-plugin-bulletin-board-backend/dist/index.d.ts:8:5
    8     database: PluginDatabaseManager;
          ~~~~~~~~
    The expected type comes from property 'database' which is declared here on type 'RouterOptions'


Found 1 error in packages/backend/src/plugins/bulletin-board.ts:11


Button should be hidden if no URL is provided

Hi - thanks for the plugin, I've been playing around with it and it looks promising. Just randomly noticed - should the Open URL button even be displayed if no URL is provided, since it's an optional field? Seems pretty straightforward, I could help contribute with a PR if we think that makes sense.

Getting Error with code 500 while submitting a new idea

I have recently installed the bulletin board and trying to test by adding the new ideas via bulletin board screen. After clicking save button, it is giving 500 on network tab. The network trace is mention below -

API URL - http://localhost:7007/api/bulletin-board/bulletins

PAyload - {"id":"DQeoA75Nf6y_NtGUxl-ba","title":"React","url":"https://legacy.reactjs.org/docs/context.html","description":"React description","tags":[],"user":null}

Response -
{
"error": {
"name": "error",
"message": "insert into "bulletins" ("bulletin_description", "bulletin_id", "bulletin_tags", "bulletin_title", "bulletin_url", "created_at", "created_by", "updated_at", "updated_by") values ($1, $2, $3, $4, $5, $6, $7, $8, $9) - null value in column "created_by" of relation "bulletins" violates not-null constraint",
"length": 392,
"severity": "ERROR",
"code": "23502",
"detail": "Failing row contains (DQeoA75Nf6y_NtGUxl-ba, React, React description, https://github.com/Maersk-Global/gco-test-dotnet/blob/main/catal..., , null, null, 2023-06-20 08:41:56.468+00, 2023-06-20 08:41:56.468+00).",
"schema": "public",
"table": "bulletins",
"column": "created_by",
"file": "execMain.c",
"line": "1968",
"routine": "ExecConstraints",
"stack": "error: insert into "bulletins" ("bulletin_description", "bulletin_id", "bulletin_tags", "bulletin_title", "bulletin_url", "created_at", "created_by", "updated_at", "updated_by") values ($1, $2, $3, $4, $5, $6, $7, $8, $9) - null value in column "created_by" of relation "bulletins" violates not-null constraint\n at Parser.parseErrorMessage (/Users/vaibhav.shimpi/source/repos//node_modules/pg-protocol/dist/parser.js:287:98)\n at Parser.handlePacket (/Users/vaibhav.shimpi/source/repos//node_modules/pg-protocol/dist/parser.js:126:29)\n at Parser.parse (/Users/vaibhav.shimpi/source/repos//node_modules/pg-protocol/dist/parser.js:39:38)\n at Socket. (/Users/vaibhav.shimpi/source/repos//node_modules/pg-protocol/dist/index.js:11:42)\n at Socket.emit (node:events:513:28)\n at Socket.emit (node:domain:489:12)\n at addChunk (node:internal/streams/readable:324:12)\n at readableAddChunk (node:internal/streams/readable:297:9)\n at Readable.push (node:internal/streams/readable:234:10)\n at TCP.onStreamRead (node:internal/stream_base_commons:190:23)"
},
"request": {
"method": "POST",
"url": "/bulletins"
},
"response": {
"statusCode": 500
}
}

Custom title and subtitle

Hello!!
Thanks for the plugin! I'm using in my company. It's is very useful!
Could you add custom title and subtitle?

Like this:

type Props = {
  title?: string;
  subtitle?: string;
};
export const BulletinBoardPage = (props: Props) => {

...

<Header title={props.title ?? 'Bulletin Board'} subtitle={props.subtitle ?? 'A basic place to share ideas and links with your team.'} />

Thank You!!!

feat: add analytics support

Add analytics support to the plugin by utilizing the @backstage/core-plugin-api useAnalytics hook. Analytics could be collected from for example posting of a new bulletin, editing it, deleting it or opening the bulletin URL.

feat: add ability to sort by created_at date as an additional option to the default orderBy('updated_at','desc').

If you want to go back to update a card with tags, text, or even the link, the default sort is by updated_at time.

This is quickly growing confusing as we have more important updates to show but older cards are coming up and appearing as newer because they only highlight the last update time.

I will create a PR for this, but I want to allow the users the option to select which filter they want with 2 current options, updated_at and created_at.

Additionally, the subtitles of the cards when displayed should show information based on this filter. Currently, it should last update time from the current time, but if you selected created_at it will show the time since it was created.

Where it is currently set to sort by

Where card subtitle is set

feat: add banner for new bulletin

Hey it would be nice for backstage users to receive mails every time a new bulletin card is created or every time a card is created with a specific tag. WDYT?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.