31 Commits

Author SHA1 Message Date
Andrew Ferrazzutti
31aa5e90ad
Don't send empty query string in widget API reqs (#518) 2022-10-04 18:04:28 -04:00
Andrew Ferrazzutti
4d3567b05a
Add label to GitLab widget's comment body toggle (#517)
* Add label to GitLab widget's comment body toggle

Also ensure that the label is part of the click region

* Add changelog

Copied from #500's changelog
2022-10-04 18:02:21 -04:00
Andrew Ferrazzutti
c29c67fc2b
Fix command prefix field in widgets (#515)
* Read-your-writes consistency on connection update

Allow updates to connections made via config widgets to be reflected
immediately upon save in the widget UI.

* Use HTML elements as `ref`s in widgets

Fixes #422

* Add changelog

* Let widgets use new connection config on save

After a connection config is updated, but before a widget requests the
latest config from the bridge, make the widget display the just-saved
config instead of what the config was before being updated.

* Use input placeholder as prefix default

Otherwise, leaving the prefix field blank would apply no prefix, and
violate prefix length requirements.
2022-10-04 17:19:21 -04:00
Andrew Ferrazzutti
3ca61b9e02
Reorganize the GitHub config widget (#508)
- Group repos by org
- Paginate repo requests
- Remove redundant label next to chosen repo
- Remove redundant repo field below connected repo
- Include repos that user has doesn't have admin permissions for, to
  achieve parity with results from provisioning API
2022-10-03 10:43:16 -04:00
Andrew Ferrazzutti
50fa037d9a
Fix Jira widget request loop for logged-out users (#507)
* Fix Jira widget request loop for logged-out users

* Add changelog file

(copied from #502)
2022-10-03 10:30:11 -04:00
Andrew Ferrazzutti
80a26283e9
Make various typechecking improvements (#505)
* Make various typechecking improvements

* Use `Record<never, never>` to cover `{}`
2022-09-30 13:50:38 -04:00
Andrew Ferrazzutti
911a73abba
Move web tsconfig to let TS language server work (#506)
* Move `web` tsconfig to let TS language server work

* Assign typing to images

This removes type errors on imported images.
2022-09-30 12:35:53 -04:00
Andrew Ferrazzutti
0111f4bfa3
Add Jira widget (#502)
* Add Jira widget

* Jira widget UI for no login vs no instances

* Update changelog wording
2022-09-30 11:52:31 -04:00
Will Hunt
4c33c60d7a
Support GitLab MR comment bodies (optionally) (#500)
* Add backend support

* Add frontend support

* Update docs

* changelog

* Update src/Connections/GitlabRepo.ts

Co-authored-by: Christian Paul <christianp@matrix.org>

* Update docs/usage/room_configuration/gitlab_project.md

Co-authored-by: Christian Paul <christianp@matrix.org>

* Tweak functions

Co-authored-by: Christian Paul <christianp@matrix.org>
2022-09-30 16:33:09 +01:00
Will Hunt
5ee267f013
Update codemirror, remove opensans (#489)
* Update codemirror, remove opensans

* changelog

* Remove our one usage of sans

* Update JS dependency too
2022-09-16 13:23:43 +00:00
Will Hunt
23eae91737
Support notifying when a GitLab MR is ready for review (#480)
* Support ready for review GitLab

* Create 480.feature

* Change event name

* Fix name

* Fix typo
2022-09-12 11:51:04 +01:00
Will Hunt
63ab457b45
Refactor feed errors and error presentation (#459)
* Add support for setting a global feed timeout

* Track failures, and don't show the first non-serious error

* Tidy up error reporting

* Make a prettier error pane

* Use the prettier event pane

* Show failed feed attempts in the widget

* Ensure we catch connection resets

* Add styling file

* Ensure we only track one result per fetch

* changelog

* Refactor to use better status codes

* Make feed results cheaper

* splice
2022-08-31 14:01:43 +01:00
Justin Carlson
49bc94e9ad
Add query parameter to scope room config widget to a particular service (#441)
* Add query parameter to scope room config widget to a particular service

* Add changelog
2022-08-18 10:47:03 -04:00
Andrew Ferrazzutti
e9613225be
Add GitHub widget (#420)
* Add GitHub widget

Also make assorted fixes to help push this along

* Remove unused import

* Resolve new linter warnings

* Undo testing-only change

Didn't mean to commit this

* Use "org/repo" as GitHub repo names in widget

* Update src/ConnectionManager.ts

Co-authored-by: Will Hunt <will@half-shot.uk>

* Don't use null assertions

* Use block scope in switch cases

* Fix some BridgeAPI imports

* Actually validate connection state

* Return only GitHub repos with admin permissions

Co-authored-by: Will Hunt <will@half-shot.uk>
2022-07-29 10:05:21 -04:00
Will Hunt
8cf8c8eff3
Add requireClient capability to widgets (#370)
* Add requireClient

* changelog
2022-06-07 14:12:01 +01:00
Tadeusz Sośnierz
d1494ff373
Add Feed configuration widget (#345)
* Refactor RoomConfigView slightly to reduce duplication

* Add Feed configuration widget

* Drop an unused parameter in FeedConnection

Co-authored-by: Will Hunt <will@half-shot.uk>

* Add a key to connection listing in RoomConfigView

Co-authored-by: Will Hunt <will@half-shot.uk>

* Be more explicit when checking for feeds enabledness

Co-authored-by: Will Hunt <will@half-shot.uk>

* Erase state when removing FeedConnection

* Tone down logging in FeedReader

* Strenghten validation of feed URLs

* Drop an unnecessary non-null assertion

* Allow adding labels to feeds

* Add changelog for #345

* Fix lint-found errors

* Improve feed setup widget changelog

Co-authored-by: Will Hunt <will@half-shot.uk>

* Validate feed URLs with HEAD if possible

* Don't log.error feed validation failures in SetupConnection

* Remove extra space

Co-authored-by: Will Hunt <will@half-shot.uk>

* Wrap errors from FeedConnection.provisionConnection in ApiErrors

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
2022-05-12 12:06:20 +01:00
Half-Shot
f3ad4a0d7d Fix broken headerImgs 2022-05-06 15:59:46 +01:00
Will Hunt
b23e516aa5
Statically define connection creation and provisioing (#330)
* Statically define connection creation and provisioing

* Tidy up

* Drop JIRA

* Convert other connections to new system

* Small linting fixes

* Fixes

* changelog

* Fix bridge

* Fix JIRA instance naming

* Fix JIRA config

* Drop unnessacery check
2022-05-06 13:58:39 +00:00
Tadeusz Sośnierz
2008f2cae0
Fix ErrorPane importing (#337)
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
2022-05-06 14:53:06 +01:00
Will Hunt
e87030487e
Move components from root to elements (#332)
* Move components from root to elements

* Revert change

* Fix import

* changelog
2022-05-06 10:25:10 +01:00
Will Hunt
f5eefaa381
Replace snowpack with vite (#334)
* Replace snowpack with vite

* changelog

* Drop old snowpack setting

* Fix
2022-05-06 09:57:18 +01:00
Will Hunt
8808385b6d
Add support for GitLab connection configuration via widgets (#320)
* Refactors to support multiple services in the widget UI

* Add GitLabRepo web component view

* Support searching and adding a GitLab repository on the frontend

* Add final bits to supporting adding and removing connections from rooms

* lint

* changelog

* Lots of changes based upon review feedback

* linting

* Add warnings

* Withdraw openid overrides change for this PR

* Drop unused

* Remove async function syntax

* Tiny bug fixes
2022-04-30 06:08:13 +01:00
Will Hunt
8f22f0d851
Use png over webp for browser compatibility (#285)
* Use png over webp for browser compatibility

* changelog
2022-04-11 09:38:57 +01:00
Half-Shot
e6467465ca Linting 2022-04-08 16:20:40 +01:00
Will Hunt
aa9e066530
Add Generic Webhooks Widget interface (#140)
* Start work on improved widget interface for admin room

* Add changes needed for InviteView

* More widget bits

* Lots more work to support setup widgets

* Redesign work

* Fix build order for web

* Remove unused invite code

* Update configs

* Cleanup

* Support widget branding

* Tidy up web app

* Support generic service config lookup

* Stronger typings for configuration

* Improve error text

* fix patch

* changelog

* First pass on documentation

* Fix tests

* fixes

* Don't require room state / admin rooms for room config requests

* Fix no render when secrets isn't provided

* rework if logic

* Fixes after feedback

* more review fixes

* Cleanup unused code

* fix indent

* Update matrix-appservice-bridge to 4.0.1

* Update widget API
2022-04-08 16:16:12 +01:00
Christian Paul
7df772cda5
Made ESLint lint all TypeScript files and fix a few linter errors (#273)
* Remove unused import of preact/h

* Remove unused imports

* Create 273.misc

* Lint all TypeScript files

* Re-add preact/h import

* Fix a few ESLint errors

* Update 273.misc

* Readd eslint:recommended

* Update .eslintrc.js

Co-authored-by: Will Hunt <will@half-shot.uk>
2022-04-06 15:25:10 +01:00
Christian Paul
88ae482a2b Only set Content-Type if we send a body 2022-04-04 00:03:57 +02:00
Will Hunt
745f628e7a Update dependencies 2021-04-11 15:18:49 +01:00
Will Hunt
368962c627 Show notification state 2020-12-12 20:39:23 +00:00
Will Hunt
5c278a2b53 Add skeleton for admin room widget 2020-12-12 20:29:49 +00:00
Will Hunt
4abf02da2a Add web configuration 2020-12-12 13:19:55 +00:00