Commit Graph
543 Commits
Author SHA1 Message Date
d58217bded ci: sync golangci-lint config (#750)
Co-authored-by: aymanbagabas <3187948+aymanbagabas@users.noreply.github.com>
2025-03-25 10:24:22 -03:00
Carlos Alexandro Becker d91c9aa894 ci: rm .golangci-soft.yml 2025-03-25 10:23:38 -03:00
Carlos Alexandro BeckerandGitHub 54f28b6501 fix(filepicker): properly scrolling filepicker (#753)
* fix(filepicker): properly scrolling filepicker

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: SetHeight

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-03-20 14:00:29 -03:00
Andrey Nering fff86382cc chore(lint): remove custom min and max functions
These are now available as builtins.
2025-03-20 10:42:52 -03:00
Andrey Nering 76433f7143 ci: fix linting on windows 2025-03-20 10:42:52 -03:00
Andrey Nering 976d9a1108 chore(go.mod): update to go 1.23 2025-03-20 10:42:52 -03:00
Andrey Nering 06824cb77d chore: add taskfile 2025-03-20 10:42:52 -03:00
Michał KotowskiandChristian Rocha cdc743f1f4 chore(links): switch bubbletea links to use main
Cosmetic change.

Old links used `master` as the main branch. Resulting in GitHub
redirecting to the correct default branch and displaying:

> Branch not found, redirected to default branch.

Signed-off-by: Michał Kotowski <dev@mkotowski.dev>
2025-03-05 06:57:17 -05:00
CharmandGitHub 7a6b190840 ci: sync dependabot config (#736) 2025-02-13 11:29:08 -03:00
CharmandGitHub 2f4944346f ci: sync dependabot config (#734) 2025-02-13 10:58:35 -03:00
Pierre RossiandChristian Rocha 0f9e38c9a7 Don't render suggestions when textinput is not focused.
This can look confusing in forms otherwise.
2025-01-28 09:24:43 -05:00
1bdd4c6fb3 fix: stopwatch.Start() (#707)
Signed-off-by: Bence Vidosits <bence.vidosits1@ibm.com>
Co-authored-by: Bence Vidosits <bence.vidosits1@ibm.com>
2025-01-22 09:10:20 -03:00
Carlos Alexandro BeckerandGitHub 7ab08fb438 fix(viewport): scroll to last line when borders (#706)
If the viewport has borders, they are not currently taken into account
when calculating the viewport max y offset, which might cause the last
line to not be visible.

This is easily reproducible in `gum pager`.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-01-21 19:31:03 -03:00
bashbunniandGitHub e3ce11a65f docs: update charm & friends blurb (#703)
* docs: update charm & friends blurb

* docs: simplify messaging, link to instructions
2025-01-17 12:48:08 -08:00
87a4e45a58 docs: additional bubbles (#583)
* docs: additional bubbles

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* Update README.md

Co-authored-by: bashbunni <15822994+bashbunni@users.noreply.github.com>

* Update README.md

Co-authored-by: Christian Rocha <christian@rocha.is>

* Update README.md

Co-authored-by: Christian Rocha <christian@rocha.is>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: bashbunni <15822994+bashbunni@users.noreply.github.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
2025-01-17 12:32:41 -08:00
2d53a618a9 feat(viewport): horizontal scroll (#240)
* horizontal scroll

* rebase branch

* add tests

* add tests with 2 cells symbols

* trimLeft, move to charmbracelete/x/ansi lib

* up ansi package

* Update viewport/viewport.go

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: do not navigate out to the right

* fix: cache line width on setcontent

* fix tests

* fix viewport tests

* add test for preventing right overscroll

* chore(viewport): increase horizontal step to 6

* chore(viewport): make horizontal scroll API better match vertical scroll API

* fix: nolint

* fix: use ansi.Cut

* perf: do not cut anything if not needed

* feat: expose HorizontalScrollPercent

* fix: do not scroll if width is 0

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: visible lines take frame into account

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
2025-01-10 08:38:48 -03:00
8624776d45 fix(textinput): slicing outside cap (#532)
* textinput: fix slicing outside cap

* textinput: add test that makes slicing outside cap occur

* chore: tidy with gofmt

---------

Co-authored-by: bashbunni <bunni@bashbunni.dev>
2024-12-05 13:40:33 -08:00
Carlos Alexandro BeckerandGitHub e5296a2b0f ci: fix goreleaser config (#668)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-15 19:00:41 -03:00
Christian Rocha 398e92c5ae fix: remove default character limit 2024-11-15 08:30:03 -05:00
Christian Rocha f439d83043 fix(textarea): max height should not determine max lines
Fixes #671.
2024-11-15 08:30:03 -05:00
Christian Rocha 730f5a29e2 fix: debounce stopwatch and timer
This keeps them from ticking too fast.

Fixes #661.
2024-11-05 22:06:53 -05:00
aymanbagabasandChristian Rocha 20a65e5655 chore(ci): sync golangci-lint config 2024-11-04 09:07:12 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
db3514caa7 feat(deps): bump github.com/charmbracelet/lipgloss from 0.13.1 to 1.0.0 (#655)
Bumps [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) from 0.13.1 to 1.0.0.
- [Release notes](https://github.com/charmbracelet/lipgloss/releases)
- [Changelog](https://github.com/charmbracelet/lipgloss/blob/master/.goreleaser.yml)
- [Commits](https://github.com/charmbracelet/lipgloss/compare/v0.13.1...v1.0.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/lipgloss
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 15:07:07 -03:00
Ayman BagabasandGitHub 8101a3462f fix(ci): add lint and lint-sync workflows and update golangci.yml (#651) 2024-10-28 10:18:13 -04:00
Ayman Bagabas 6f3d765c59 chore: bump bubbletea and ansi 2024-10-24 16:01:07 -04:00
Christian Rocha 358a6c58c8 chore(lint): fix and suppress all soft lint issues; update directives 2024-10-24 12:35:42 -04:00
dependabot[bot]andGitHub 7525b8c853 Merge pull request #645 from charmbracelet/dependabot/go_modules/github.com/charmbracelet/lipgloss-0.13.1 2024-10-24 15:42:24 +00:00
dependabot[bot]andGitHub a9b780a96c feat(deps): bump github.com/charmbracelet/lipgloss from 0.13.0 to 0.13.1
Bumps [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/charmbracelet/lipgloss/releases)
- [Changelog](https://github.com/charmbracelet/lipgloss/blob/master/.goreleaser.yml)
- [Commits](https://github.com/charmbracelet/lipgloss/compare/v0.13.0...v0.13.1)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/lipgloss
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-23 17:28:20 +00:00
bashbunniandGitHub 178590b446 docs: update contributing guidelines (#640) 2024-10-16 09:57:39 -07:00
Christian Rocha 60796500b2 chore(help): add full help test to support #554 2024-10-11 11:17:18 -04:00
David Luevano AlvaradoandChristian Rocha 81d444a207 fix(help): wrong full help sep rendering 2024-10-10 15:50:30 -04:00
nobe4andGitHub 171a9d61a0 feat(list): implement GlobalIndex helper (#574)
* feat(list): implement GlobalIndex helper

This commit introduces a new `filteredItem` field called `index` which
stores the index of the filtered item in the unfiltered list. This
allows to get at runtime the unfiltered list index for the selected (and
possibly filtered) item.

This is the only solution I found to use `SetItem` with a filtered
list.

The name `GlobalIndex` might not be ideal, I'm happy to change it to
something else. (`UnfilteredIndex`?)

Fixes: #550

* docs(list): improve Index() documentation
2024-10-09 16:59:04 -07:00
cui fliterandGitHub 076b578512 chore: Remove duplicate and redundant code (#626)
Signed-off-by: cuishuang <imcusg@gmail.com>
2024-10-07 15:29:06 -03:00
AashutoshandGitHub cf3f46ab31 docs(list): fix grammar in doc comment and README (#627) 2024-10-07 15:26:58 -03:00
9a262e9b0f fix: use atomic for ids (#634)
closes #622

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Ville Valkonen <weezel@users.noreply.github.com>
2024-10-07 15:26:12 -03:00
David Luevano AlvaradoandChristian Rocha 4382fdf1c6 feat(textinput): expose matched suggestions and index 2024-09-19 14:16:51 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ed14316c61 feat(deps): bump github.com/charmbracelet/x/ansi from 0.3.1 to 0.3.2 (#618)
Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/charmbracelet/x/releases)
- [Commits](https://github.com/charmbracelet/x/compare/ansi/v0.3.1...ansi/v0.3.2)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/x/ansi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 13:53:19 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d3ac47df46 feat(deps): bump github.com/charmbracelet/x/ansi from 0.3.0 to 0.3.1 (#615)
Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/charmbracelet/x/releases)
- [Commits](https://github.com/charmbracelet/x/compare/ansi/v0.3.0...ansi/v0.3.1)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/x/ansi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 13:15:01 -04:00
Ayman BagabasandGitHub 9589cbc16c fix: lint issues and disable predeclared linter (#614) 2024-09-12 14:33:07 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c1199d7be6 feat(deps): bump github.com/charmbracelet/x/ansi from 0.2.3 to 0.3.0 (#613)
Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.2.3 to 0.3.0.
- [Release notes](https://github.com/charmbracelet/x/releases)
- [Commits](https://github.com/charmbracelet/x/compare/ansi/v0.2.3...ansi/v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/x/ansi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 13:20:10 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1797ac268d feat(deps): bump github.com/charmbracelet/bubbletea from 1.1.0 to 1.1.1 (#611)
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 12:04:14 -03:00
Christian Rocha 64cc034014 chore(lint): update deprecated directive 2024-09-12 10:43:36 -04:00
Christian Rocha 2caa9d4bdf chore(viewport): deprecate performance rendering stuff 2024-09-12 10:43:36 -04:00
d019ed3cc9 feat(list): add SetFilterText and SetFilterState (#335)
* Add SetFilterText and SetFilterState

* make linter happy

* make SetFilterState state not hardcoded

* tests for SetFilterText and SetFilterState

* fix small typo

---------

Co-authored-by: k-x7 <97758178+k-x7@users.noreply.github.com>
2024-09-10 14:22:03 -03:00
Carlos Alexandro BeckerandGitHub d3bd075ed2 feat(cursor): focus/blur support (#581)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
v0.20.0
2024-09-05 14:10:05 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6fc27e99d3 feat(deps): bump github.com/charmbracelet/bubbletea from 1.0.0 to 1.1.0 (#607)
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-05 14:07:41 -03:00
Christian Rocha a163c6c59d chore(lint): disable predeclared due to false positives 2024-09-02 11:46:35 -04:00
Christian Rocha 72de4f47dc chore(lint): update mnd name, remove deprecated directives
Linter output for this change:

* The linter "deadcode" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
* The linter "structcheck" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
* The linter "varcheck" is deprecated (step 2) and deactivated. It should be removed from the list of disabled linters. https://golangci-lint.run/product/roadmap/#linter-deprecation-cycle
* The linter 'gomnd' is deprecated (since v1.58.0) due to: The linter has been renamed. Replaced by mnd.
2024-09-02 11:46:35 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3eaf8da348 feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#604)
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.27.0 to 1.0.0.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.27.0...v1.0.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 09:40:18 -03:00
Florian ReyandChristian Rocha 5110925e87 feat: Introduce paginator options 2024-08-27 10:41:31 -04:00