+ No items found. Ensure you have typed at least 3 characters (already added are not
+ shown).
+
} @else {
@for (day of agendaItems(); track day.dayStr) {
diff --git a/src/app/features/issue/providers/trello/trello-api.service.spec.ts b/src/app/features/issue/providers/trello/trello-api.service.spec.ts
index f8e7014cc..03ee33292 100644
--- a/src/app/features/issue/providers/trello/trello-api.service.spec.ts
+++ b/src/app/features/issue/providers/trello/trello-api.service.spec.ts
@@ -205,14 +205,15 @@ describe('TrelloApiService', () => {
});
describe('HTTP parameters', () => {
- it('should include api key and token in all requests', (done) => {
+ it('should include api key in query parameters', (done) => {
service.testConnection$(mockCfg).subscribe(() => {
done();
});
const req = httpMock.expectOne((request) => request.url.includes('/boards/'));
expect(req.request.urlWithParams).toContain('key=test-api-key');
- expect(req.request.urlWithParams).toContain('token=test-token');
+ expect(req.request.headers.has('Authorization')).toBe(true);
+ expect(req.request.headers.get('Authorization')).toBe('Bearer test-token');
req.flush({ id: mockCfg.boardId });
});
@@ -224,6 +225,7 @@ describe('TrelloApiService', () => {
const req = httpMock.expectOne((request) => request.url.includes('/search'));
expect(req.request.urlWithParams).toContain('query=test');
expect(req.request.urlWithParams).toContain('%26');
+ expect(req.request.headers.get('Authorization')).toBe('Bearer test-token');
req.flush({ cards: [] });
});
});
diff --git a/src/app/features/issue/providers/trello/trello-view-components/trello_cfg/trello_additional_cfg.component.ts b/src/app/features/issue/providers/trello/trello-view-components/trello_cfg/trello_additional_cfg.component.ts
index 1bc69605f..b48a32e0f 100644
--- a/src/app/features/issue/providers/trello/trello-view-components/trello_cfg/trello_additional_cfg.component.ts
+++ b/src/app/features/issue/providers/trello/trello-view-components/trello_cfg/trello_additional_cfg.component.ts
@@ -18,6 +18,7 @@ import { IssueProviderTrello } from 'src/app/features/issue/issue.model';
import { ConfigFormSection } from 'src/app/features/config/global-config.model';
import { MatFormField, MatLabel } from '@angular/material/form-field';
import { MatSelect, MatOption } from '@angular/material/select';
+import { MatButton } from '@angular/material/button';
import { AsyncPipe } from '@angular/common';
import { BehaviorSubject, Observable, Subscription, of } from 'rxjs';
import { catchError, map, tap, debounceTime, switchMap, startWith } from 'rxjs/operators';
@@ -37,6 +38,7 @@ interface TrelloBoard {
MatLabel,
MatSelect,
MatOption,
+ MatButton,
AsyncPipe,
],
@@ -45,12 +47,22 @@ interface TrelloBoard {
template: `
Select a Trello Board for searching issues.
+ @let isLoading = isLoading$ | async;
+
- @let isLoading = isLoading$ | async;
@if (isLoading) {
No boards found (yet)...
}
@@ -191,4 +203,20 @@ export class TrelloAdditionalCfgComponent implements OnInit, OnDestroy {
this.modelChange.emit(updated);
}
}
+
+ reloadBoards(): void {
+ if (!this._cfg || !this._cfg.apiKey || !this._cfg.token) {
+ this._snackService.open({
+ type: 'ERROR',
+ msg: 'Enter API key and token first.',
+ isSkipTranslate: true,
+ });
+ return;
+ }
+
+ this.isCredentialsComplete = true;
+ this.isLoading$.next(true);
+ this._credentialsChanged$.next({ ...this._cfg });
+ this._cdr.markForCheck();
+ }
}
diff --git a/src/app/features/issue/providers/trello/trello.const.ts b/src/app/features/issue/providers/trello/trello.const.ts
index 2b0195887..a7cdba15b 100644
--- a/src/app/features/issue/providers/trello/trello.const.ts
+++ b/src/app/features/issue/providers/trello/trello.const.ts
@@ -38,6 +38,13 @@ export const TRELLO_CONFIG_FORM: LimitedFormlyFieldConfig[]
type: 'password',
required: true,
},
+ validators: {
+ token: {
+ expression: (c: { value: string | undefined }) =>
+ !c.value || c.value.length >= 32,
+ message: 'Trello token is typically 32+ characters',
+ },
+ },
},
// search boards
{
@@ -63,7 +70,7 @@ export const TRELLO_CONFIG_FORM_SECTION: ConfigFormSection
},
{
h: 'Selecting Your Board',
- p: 'After entering your API key and token, you will be able to select the Trello board you want to work with. Only cards from the selected board will be accessible in Super Productivity.',
+ p: 'After entering your API key and token, click "Load Trello Boards" and you will be able to select the Trello board you want to work with. Only cards from the selected board will be accessible in Super Productivity.',
},
{
h: 'Features',
From 7f6d736797b752e35e99b3c0892d74e631d8bdfd Mon Sep 17 00:00:00 2001
From: Ronaldo93 <51114190+Ronaldo93@users.noreply.github.com>
Date: Fri, 21 Nov 2025 16:57:33 +0000
Subject: [PATCH 17/18] fix: failed test
* feat: add icon in providers list
---
.../issue-provider-setup-overview.component.html | 3 +--
.../issue/providers/trello/trello-api.service.ts | 9 ++++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/app/features/issue-panel/issue-provider-setup-overview/issue-provider-setup-overview.component.html b/src/app/features/issue-panel/issue-provider-setup-overview/issue-provider-setup-overview.component.html
index d30a6cf28..7087603e2 100644
--- a/src/app/features/issue-panel/issue-provider-setup-overview/issue-provider-setup-overview.component.html
+++ b/src/app/features/issue-panel/issue-provider-setup-overview/issue-provider-setup-overview.component.html
@@ -37,8 +37,7 @@
mat-raised-button
(click)="openSetupDialog('TRELLO')"
>
-
-
+
Trello