Skip to content

Move gb-ui components into frontend - #1482

Open
cclts wants to merge 4 commits into
GreedyBear-Project:developfrom
cclts:migrate-gb-ui-local-components
Open

Move gb-ui components into frontend#1482
cclts wants to merge 4 commits into
GreedyBear-Project:developfrom
cclts:migrate-gb-ui-local-components

Conversation

@cclts

@cclts cclts commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move the gb-ui components currently used by GreedyBear into frontend/src/components/common/gb-ui/
  • Replace @greedybear/gb-ui imports with local imports
  • Remove the external @greedybear/gb-ui dependency and declare the direct dependencies needed by the copied components
  • Update frontend tests/mocks to use the local component module

Related issues

#1454 option 1: Move the components we actually use to GreedyBear.

Type of change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Chore (refactoring, dependency updates, CI/CD changes, code cleanup, docs-only changes).

Checklist

Please complete this checklist carefully. It helps guide your contribution and lets maintainers verify that all requirements are met.

Formalities

  • I have read and understood the rules about how to Contribute to this project.
  • I chose an appropriate title for the pull request in the form: <feature name>. Closes #999
  • My branch is based on develop.
  • The pull request is for the branch develop.
  • I have reviewed and verified any LLM-generated code included in this PR.

Docs and tests

  • I documented my code changes with docstrings and/or comments.
  • I have checked if my changes affect user-facing behavior that is described in the docs. If so, I also included an update to the wiki in the description of this PR.
  • Linter (Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved.
  • All the tests gave 0 errors.

@cclts
cclts force-pushed the migrate-gb-ui-local-components branch from 8d736d0 to f597539 Compare July 29, 2026 21:01
@regulartim

Copy link
Copy Markdown
Member

Hey @cclts ! Should I already review?

@cclts

cclts commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@regulartim Could you give me a little more time? I should be able to get to it by Friday!

@regulartim

Copy link
Copy Markdown
Member

@regulartim Could you give me a little more time? I should be able to get to it by Friday!

No worries, take your time! Just wanted to know.

@cclts
cclts force-pushed the migrate-gb-ui-local-components branch from f597539 to 99c696c Compare August 10, 2026 20:02
@cclts

cclts commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

I also migrated gb-ui’s table visual regression test into GreedyBear. Since the original test relied on gb-ui’s example/#/table page, I added a minimal test-only fixture under frontend/tests/visual/ instead of migrating the whole demo app. This preserves coverage for sorting, filtering, row expansion, selection, disabled rows, empty states, pagination, and mobile layout.

The visual test can be run manually with npm run test:visual. I also excluded tests/visual/** from Vitest discovery, so CI’s npm run test-coverage does not try to execute Playwright specs.

@cclts
cclts force-pushed the migrate-gb-ui-local-components branch from 7473ae5 to 07d19f0 Compare August 10, 2026 21:16
@cclts

cclts commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @regulartim this pr is ready for review, if you have a chance please take a look thanks!

@cclts
cclts marked this pull request as ready for review August 10, 2026 22:26
@cclts

cclts commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

I’m thinking adding a short Visual tests section to frontend/README.md to document that npm run test:visual is run manually, and that npm run test:visual:update should only be used when intentionally updating screenshot baselines. Does that sound good? @regulartim

@mlodic

mlodic commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Tim is away for few weeks, considering this is not urgent matter, I'd prefer having him reviewing this work once he comes back.

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.

3 participants