bubble-table icon indicating copy to clipboard operation
bubble-table copied to clipboard

Added functionality to implement help.KeyMap interface

Open MaximilianSoerenPollak opened this issue 1 year ago • 1 comments

So as discussed in #184 this is a first attempt at including this.

I didn´t really know where to put the tests so I made a new file, hope that structure works for you.

The naming, as well as testing / layout etc. is all changeable, just wanted to provide a first look at how this interface could be provided.

Let me know what you think.

MaximilianSoerenPollak avatar Oct 09 '24 13:10 MaximilianSoerenPollak

I have run

  • [x] make fmt
  • [x] make lint (it errors on things outside our package??)
  • [x] make test
    ok github.com/evertras/bubble-table/table 1.110s coverage: 98.3% of statements

Let me know if there is anything I have missed to run.

Also let me know any feedback regarding the implementation.

MaximilianSoerenPollak avatar Oct 09 '24 13:10 MaximilianSoerenPollak

I adapted the PR to the comments made. Let me know if anything else needs changing :)

MaximilianSoerenPollak avatar Oct 24 '24 04:10 MaximilianSoerenPollak

Thanks for the updates, just need to fix the page text a bit and then I think we're good to merge!

Evertras avatar Oct 26 '24 07:10 Evertras

All help text should be consitent now, I also fixed any Linting issues I found. Let me know if anything else needs fixing :)

MaximilianSoerenPollak avatar Oct 26 '24 11:10 MaximilianSoerenPollak

Looks like a few more linting errors snuck in.

Evertras avatar Oct 27 '24 02:10 Evertras

Ok just fixed the latest ones. Hope that should be all :)

MaximilianSoerenPollak avatar Oct 27 '24 15:10 MaximilianSoerenPollak

The linter is still angry about the extra newlines. :(

Evertras avatar Oct 28 '24 10:10 Evertras

I tried again :D.

I'm unsure what to do, Gitlint locally just checks everything in my local drive not just the directory. I don't know why...

MaximilianSoerenPollak avatar Oct 28 '24 17:10 MaximilianSoerenPollak

Are you running make lint?

https://github.com/Evertras/bubble-table/actions/runs/11559775491/job/32221732059?pr=185 still has the newline issues.

Evertras avatar Oct 29 '24 13:10 Evertras

Yep usiing run/lint sadly still same, see my output underneath. image

Others have said it might be cause I don´t have the same Golang version locally as is used in the linter. But not sure. It also does not show the errors the CI/CD makes, which makes it even more confusing Q_Q. I now have I think catched all remaining errors (4).

MaximilianSoerenPollak avatar Oct 30 '24 05:10 MaximilianSoerenPollak

Is it unhappy with the newline in the comment or the one before the return?

but why then does it complain in other lines that it needs an empty line before a return?

image

MaximilianSoerenPollak avatar Oct 30 '24 13:10 MaximilianSoerenPollak

// Good
if something {
  return true
}

// Bad
if something {
  fmt.Println("Thing")
  return
}

Basically, a statement before it versus a {

Evertras avatar Oct 30 '24 13:10 Evertras

// Good
if something {
  return true
}

// Bad
if something {
  fmt.Println("Thing")
  return
}

Basically, a statement before it versus a {

OKay that makes it much more clear. Will correct it and push again :)

MaximilianSoerenPollak avatar Oct 31 '24 07:10 MaximilianSoerenPollak

Thank you for the patience and fixes!

Evertras avatar Oct 31 '24 13:10 Evertras