Commit Graph
550 Commits
Author SHA1 Message Date
bashbunniandGitHub 2b22d5293f docs: update custom bubbles requirements (#495) 2024-03-13 13:21:30 -07:00
David ZeleniakandGitHub e726cbfb5c fix(table): table scrolls before selected reaches top/bottom (#429)
* Fix bug in moving up in table

* fix

* Fix table viewport scroll down too early
2024-03-13 14:39:10 -04:00
6dbfc8284d fix(table): substract headers Y size from the total table size (#434)
* fix(table): substract headers Y size from the total table size

* fix: change GetFrameSize to GetVerticalFrameSize and calc header height

* fix: remove GetVerticalFrameSize at all

* fix: account for headers in height WithHeight, SetHeight

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2024-03-13 14:31:42 -04:00
Moritz BieringandChristian Rocha 961c081347 Fix division by zero in viewport scrollpercentage calculation 2024-03-11 09:32:23 -04:00
Michael LorantandGitHub b9e62cbfe1 Improve textarea tests (#490) 2024-03-08 19:23:05 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e3823b2f22 feat(deps): bump github.com/charmbracelet/lipgloss from 0.9.1 to 0.10.0 (#493)
Bumps [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/charmbracelet/lipgloss/releases)
- [Commits](https://github.com/charmbracelet/lipgloss/compare/v0.9.1...v0.10.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/lipgloss
  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-03-05 13:45:57 -05:00
Maas LalaniandGitHub 8a6f531287 feat: add ctrl+right and ctrl+left to perform WordBackward and WordForward actions (#387) 2024-03-04 11:00:05 -05:00
Michael LorantandGitHub 6c9e52a8fd Fix end of buffer character (#491) 2024-02-29 10:29:45 -05:00
Maas LalaniandGitHub 6ebf50e419 Update CODEOWNERS 2024-02-28 21:49:24 -05:00
Maas LalaniandGitHub 492bc8be4d Create CODEOWNERS 2024-02-28 21:04:14 -05:00
Maciej WięcekandGitHub 9ffcdc06a0 feat(table): implement help.Keymap interface and add quit mapping (#440)
* feat(table): implement help.Keymap interface and add quit mapping

* feat(table): implement help.Keymap interface and add quit mapping
2024-02-28 14:12:37 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9d9d5ad2bc feat(deps): bump github.com/sahilm/fuzzy (#488)
Bumps [github.com/sahilm/fuzzy](https://github.com/sahilm/fuzzy) from 0.1.1-0.20230530133925-c48e322e2a8f to 0.1.1.
- [Release notes](https://github.com/sahilm/fuzzy/releases)
- [Commits](https://github.com/sahilm/fuzzy/commits/v0.1.1)

---
updated-dependencies:
- dependency-name: github.com/sahilm/fuzzy
  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-02-28 12:48:21 -05:00
AnirudhaandGitHub e27ec01b6e fix: Bug: SetMode method in cursor library does not handle invalid mode values correctly (#477)
* fix cursor SetMode

* adjust the mode value
2024-02-28 12:18:16 -05:00
1029f3164d (fix)table: don't render a column with a width <= 0 (#465)
* (fix)table: don't render a column with a width <= 0

This address #464

* Better check location

---------

Co-authored-by: Fabrice Bessettes <fbessett@cisco.com>
2024-02-28 12:15:07 -05:00
Abe LeiningerandGitHub 9a7c783a75 feat(table): added column return func (#369) 2024-02-28 11:39:37 -05:00
Travis HarrisonandGitHub 9fb83699e9 feat(textarea): add help to textarea key bindings (#418) 2024-02-28 11:38:47 -05:00
af7e9ed3e1 Render Row Tests (#487)
* test(table): add renderRow test

* refactor(table): row tests

---------

Co-authored-by: Bill Havanki <bill.havanki@segment.com>
2024-02-28 11:30:22 -05:00
neko.pyandMaas Lalani 6b817f345c Fix list pagination functions
1. Set receivers for list.NextPage and list.PrevPage to pointers
2024-02-28 11:11:06 -05:00
dependabot[bot]andMaas Lalani 0c1d0ce056 chore(deps): bump golangci/golangci-lint-action from 3 to 4
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-28 11:08:11 -05:00
anirudhaCodesandMaas Lalani dddc027450 Add paginator test 2024-02-28 11:05:26 -05:00
dependabot[bot]andMaas Lalani 9ef5a1025b feat(deps): bump github.com/rivo/uniseg from 0.4.6 to 0.4.7
Bumps [github.com/rivo/uniseg](https://github.com/rivo/uniseg) from 0.4.6 to 0.4.7.
- [Release notes](https://github.com/rivo/uniseg/releases)
- [Commits](https://github.com/rivo/uniseg/compare/v0.4.6...v0.4.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-28 10:58:36 -05:00
Maas Lalani c94f0cc151 fix(textarea): end of buffer alignment 2024-02-28 10:57:49 -05:00
Michael LorantandMaas Lalani e985ec9f15 Add tests for textarea view
Add improved unit tests for textarea view function.

The end of buffer unit test was flawed and failed to properly check
whether the end of buffer character was in the correct location. This
test has been removed as this feature is now verified as part of these
test cases.

Signed-off-by: Michael Lorant <michael.lorant@nine.com.au>
2024-02-28 10:49:34 -05:00
Maas Lalani 3f2cd55237 fix(ci): update coverage workflow 2024-02-28 10:45:29 -05:00
Carlos Alexandro BeckerandGitHub eed309fb7d docs: fix list delegate et al links (#467) 2024-02-06 09:36:31 -05:00
Randall WinkhartandChristian Rocha 350d5e99d9 Rename WithCustomFillCharacters to WithFillCharacters 2024-02-06 09:06:12 -05:00
Randall WinkhartandChristian Rocha 7fe39190c8 feat(progress): make full/empty fill characters configurable 2024-02-06 09:06:12 -05:00
79cc9621d5 fix(textinput): out of range panic if no matched suggestions (#473)
* fix(textinput): out of range panic if no matched suggestions

* fix(textinput): out of bounds check

Co-authored-by: Maas Lalani <maas@lalani.dev>

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2024-02-02 16:02:24 -05:00
Maas Lalani 364eac96a8 feat: remove space for filesize v0.18.0 2024-01-31 11:28:54 -05:00
dependabot[bot]andMaas Lalani a2e290966a feat(deps): bump github.com/rivo/uniseg from 0.4.4 to 0.4.6
Bumps [github.com/rivo/uniseg](https://github.com/rivo/uniseg) from 0.4.4 to 0.4.6.
- [Release notes](https://github.com/rivo/uniseg/releases)
- [Commits](https://github.com/rivo/uniseg/compare/v0.4.4...v0.4.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-30 10:44:18 -05:00
Maas Lalani 07e7bd4ee4 feat(filepicker): optional file permissions and file size 2024-01-29 17:13:36 -05:00
Maas Lalani 034ee8551e fix(filepicker): push / pop views 2024-01-29 15:59:11 -05:00
Maas Lalani 01d22a0ab1 fix(filepicker): height calculations 2024-01-29 15:00:43 -05:00
Christian MuehlhaeuserandMaas Lalani d98bf9db0a fix(textarea): correctly trim incoming paste 2024-01-28 12:11:46 -05:00
Maas Lalani fc18779a6a feat: add OnFirstPage method for consistency 2024-01-25 11:17:25 -05:00
Maas Lalani 6399027ab7 perf(textinput): use uniseg.StringWidth 2024-01-22 15:37:12 -05:00
6fe92f94b5 perf(textarea): implement wrapping memoization
* Improve textarea performance by caching the wrap results

* Add memoization utility

* Fix failing github jobs due to requirement for 1.18

* Address linting issues

* Fix redundant docstrings

* fix: minor changes to memoization

* fix: soft-wrapped hidden line numbers

* perf: switch to `uniseg.StringWidth`

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2024-01-22 13:30:34 -05:00
naglisandMaas Lalani ec883029c8 refactor(textinput): reduce allocations
As the number of items in `suggestions` and `m.suggestions` is known,
we can use `make` with the expected size instead of appending, which
requires more allocations as the slice grows.
2024-01-08 12:07:49 -05:00
Ivan ValdesandMaas Lalani 1ba1200c31 fix(viewport): pad width to contentWidth 2024-01-08 11:43:20 -05:00
f36aa3c4b5 fix(textinput): Placeholder No Longer Changes Width + Paste Calculation (#451)
* Fix pasting calculations

Available length calculation now correctly trims pasted text.

* fix(textInput): Width padding added when placeholder is used

When `placeholder` is set, padding from `Width` was not added within the `placeholderView()` function.

* Adding missing 'm.'

* Maintain Width no matter placeholder size delta

* Fixed Math

* Added Comments

* fix: lint

---------

Co-authored-by: Donovan Hubbard <37090676+donovanhubbard@users.noreply.github.com>
Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-12-23 16:02:26 -05:00
Maas LalaniandGitHub fc50558f4b Revert "fix: truncate textinput placeholder (#442)" (#450)
This reverts commit 9a0ff2ba4d.
2023-12-23 13:57:42 -05:00
9a0ff2ba4d fix: truncate textinput placeholder (#442)
Co-authored-by: Sean Banko <seanbanko@Seans-MacBook-Air.local>
2023-12-21 23:14:53 -05:00
dependabot[bot]andAyman Bagabas 15ea7f3754 chore(deps): bump actions/setup-go from 4 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
v0.17.1
2023-12-13 10:38:31 -08:00
Ayman Bagabas 330dd3fa5d feat: upgrade bubbletea and remove deprecated code
Supersedes: https://github.com/charmbracelet/bubbles/pull/447
2023-12-13 10:37:00 -08:00
dependabot[bot]andGitHub 167e9067bc feat(deps): bump github.com/charmbracelet/lipgloss from 0.7.1 to 0.9.1 (#424) v0.17.0 2023-10-13 12:32:27 +00:00
lc-1010andChristian Rocha f53b3d9f61 fix: Unicode character encoding error 2023-09-28 10:29:30 -04:00
dependabot[bot]andGitHub 540c8ac803 chore(deps): bump actions/checkout from 3 to 4 (#416) 2023-09-05 11:58:27 +00:00
eda891258c Support suggestions and autocompletion in textinput (#407)
* migrate all autocomplete-work from old branch

* added support for multiple suggestions

* fix linter issues

* refactored to only offer matching suggestions for completion

* fix: SetSuggestions + Suggestions

* make: configuration behaviour configurable

* fix for double-width runes

* refactored all suggestions to be rune-arrays

also: accepting suggestions does not overwrite the already given input, rather appends

* fix: make suggestions and OnAcceptSuggestions unexported

* refactor: refreshingMatchingSuggestions -> updateSuggestions

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-08-21 11:26:02 -04:00
naglisandGitHub 95d7be54d9 refactor(list): reduce allocations in filterItems (#396)
As the number of items in `targets` is known, use `make` with the
expected size instead of appending, which requires more allocations as
the `targets` slice grows.
2023-07-25 14:06:33 -07:00
Maas LalaniandGitHub 0bdcc628fb fix(list): No items found. -> No items. (#393) 2023-07-11 14:42:33 -04:00