Skip to content

#87 - testing-fab - #88

Merged
mumenthalers merged 22 commits into
mainfrom
#87-testing-fab
Jul 9, 2026
Merged

#87 - testing-fab#88
mumenthalers merged 22 commits into
mainfrom
#87-testing-fab

Conversation

@mumenthalers

@mumenthalers mumenthalers commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Implements a configurable Testing FAB in @shiftcode/ngx-components instead of only documenting terminology.

Changes Made

  • Added TestingFabComponent as a floating, always-on-top FAB with an expandable control panel.
  • Added provideTestingFab(...) for opt-in provisioning.
  • Added typed widget contracts for:
    • Action widgets
    • Select query param widgets
    • Custom component widgets
  • Implemented URL-authoritative behavior for select-query-param widgets (read/update query params).
  • Exported the new Testing FAB APIs via libs/components/src/public-api.ts.
  • Added focused unit tests for rendering and behavior.
  • Updated component docs and corrected glossary acronym capitalization (URL, HTML) in CONTEXT.md.
  • Updated provideTestingFab(...) to accept either a static widget config or a factory (ValueOrFactory pattern).
  • Added environment initialization to mount sc-testing-fab automatically via createComponent(...) and provideEnvironmentInitializer(...).
  • Simplified custom-component widgets to render only the component type (removed custom inputs support).
  • Added hardReload support for select-query-param widgets to optionally update the URL and reload directly.
  • Migrated template control flow to modern Angular syntax (@for, @switch, @let) and switched toggle behavior to native popover.
  • Added CSS custom properties for FAB positioning and theming (inset, margin, size, border-radius, background/foreground colors, and icon URL with default Shiftcode logo).
  • Added/updated unit tests to cover provider config modes and hard-reload behavior.

Copilot AI review requested due to automatic review settings July 3, 2026 19:17
@mumenthalers

Copy link
Copy Markdown
Contributor Author

@copilot implement issue #87

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds project terminology definitions for the planned “Testing FAB” feature so Consumer applications and the Library share consistent language when documenting/implementing the FAB and its widgets.

Changes:

  • Introduces standardized terms: Testing FAB, Action Widget, Select Query Param Widget, Custom Component Widget.
  • Documents behavioral concepts (URL-authoritative selection, opt-in provisioning, Consumer-owned activation safety).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CONTEXT.md Outdated
Comment thread CONTEXT.md Outdated
Comment thread CONTEXT.md Outdated

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@copilot implement issue #87

Implemented issue #87 in commit b9b7512: added a configurable Testing FAB with provider API (provideTestingFab), action/select-query-param/custom-component widgets, component rendering/URL query-param behavior, tests, and public/docs exports.

@mumenthalers mumenthalers left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot fix comments. make use of the mcp to get info

Comment thread libs/components/src/lib/testing-fab/provide-testing-fab.ts Outdated
Comment thread libs/components/src/lib/testing-fab/testing-fab-widget.type.ts Outdated
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.scss
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.ts Outdated
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.ts Outdated
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.ts Outdated
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.ts
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.ts Outdated
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.ts Outdated
Comment thread libs/components/src/lib/testing-fab/provide-testing-fab.ts Outdated

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@copilot fix comments. make use of the mcp to get info

Addressed in commit 51137d0.

I updated the Testing FAB provider API and rendering initializer, migrated the component to modern Angular control flow + native popover, added hard-reload support for select query-param widgets, removed custom-component inputs, and updated tests accordingly. I also attempted to fetch PR metadata via GitHub MCP, but this environment returned 404 for shiftcode/sc-ng-commons-public PR #87.

Comment thread libs/components/src/lib/testing-fab/provide-testing-fab.ts Outdated
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.ts Outdated
@mumenthalers

Copy link
Copy Markdown
Contributor Author

@copilot fix fox

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@copilot fix fox

Fixed in commit 3b41721.

@mumenthalers

Copy link
Copy Markdown
Contributor Author

@copilot fix formatting (prettier). also make sure lint, test, build will run

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@copilot fix formatting (prettier). also make sure lint, test, build will run

Addressed in commit d9d98ac.

I applied Prettier formatting fixes to the 4 failing Testing FAB files. I also checked Actions via MCP: the new workflow run for this commit is #515 and is currently action_required, so lint/test/build have not executed yet until that run is approved/released.

@mumenthalers

Copy link
Copy Markdown
Contributor Author

@copilot now linting failed. you know that you can execute those commands yourself?

and when commitin it should actually be run by husky, right?

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@copilot now linting failed. you know that you can execute those commands yourself?

and when commitin it should actually be run by husky, right?

Fixed in commit d243942.

I checked the failing CI lint job via MCP logs, reproduced the issue context locally as far as this sandbox allows, and fixed the reported lint violations in the Testing FAB files.

And yes: commits should run Husky pre-commit here (.husky/pre-commit runs npx lint-staged), so staged files in libs/components go through eslint/prettier before commit.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 7 comments.

Comment thread libs/components/README.md Outdated
Comment thread libs/components/README.md Outdated
Comment thread libs/components/src/lib/testing-fab/provide-testing-fab.ts
Comment thread libs/components/src/lib/testing-fab/initialize-testing-fab.ts
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.ts Outdated
Comment thread apps/styleguide/src/main.ts Outdated
Comment thread libs/components/src/lib/testing-fab/testing-fab.component.html
arisjavet
arisjavet previously approved these changes Jul 7, 2026
@mumenthalers

Copy link
Copy Markdown
Contributor Author

@copilot address the open comments

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@copilot address the open comments

Addressed in commit d5f8e57.

I fixed the remaining active review comments by naming the testing-fab injection token, updating the provideTestingFab(...) docs/async initializer path, and strengthening the initializer spec to assert rendered inner content. I also rechecked the changed files with Prettier and ran final PR validation (code review + CodeQL: no findings).

Comment thread libs/components/src/lib/testing-fab/testing-fab-config.token.ts Outdated
Comment thread libs/components/src/lib/testing-fab/provide-testing-fab.ts Outdated
Comment thread libs/components/src/lib/testing-fab/provide-testing-fab.ts Outdated
Comment thread libs/components/src/lib/testing-fab/initialize-testing-fab.spec.ts Outdated
@mumenthalers
mumenthalers merged commit 372ed33 into main Jul 9, 2026
2 checks passed
@mumenthalers
mumenthalers deleted the #87-testing-fab branch July 9, 2026 13:58
@michaelwittwer michaelwittwer linked an issue Jul 10, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

testing-fab

6 participants