gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Rename project board -> column to make the UI less confusing

Open lunny opened this issue 1 year ago • 21 comments

This PR split the Board into two parts. One is the struct has been renamed to Column and the second we have a Template Type.

But to make it easier to review, this PR will not change the database schemas, they are just renames. The database schema changes could be in future PRs.

lunny avatar Mar 29 '24 07:03 lunny

You stole my PR idea!!! 🤣 Will review later today. This has to be done carefully to avoid breaking templates for example.

denyskon avatar Mar 29 '24 09:03 denyskon

Do we need any renames on the templates and UI parts?

silverwind avatar Mar 29 '24 10:03 silverwind

IIRC, the router also used Boards, so it should also be present in the template. Same for corresponding JS code. I can't check currently, but I will later today

denyskon avatar Mar 29 '24 10:03 denyskon

Definitly should do it all at once, not just backend only.

silverwind avatar Mar 29 '24 10:03 silverwind

I would suggest do not merge it until 1.22.1 or 1.22.2, otherwise any bug fix would be difficult to backport

wxiaoguang avatar Mar 29 '24 10:03 wxiaoguang

I would suggest do not merge it until 1.22.1 or 1.22.2, otherwise any bug fix would be difficult to backport

I disagree. Now is the best time for big refactors. And if those refactors are well-tested, they should be backported as well to enable future backports to be automatic.

silverwind avatar Mar 29 '24 10:03 silverwind

And if those refactors are well-tested

The problem is, I didn't see how "those refactors are well-tested"

wxiaoguang avatar Mar 29 '24 12:03 wxiaoguang

It's just a rename refactoring. We need to be careful of struct methods or form fields which may be used in the template.

lunny avatar Apr 08 '24 01:04 lunny

Do we need renaming board in docs?

yp05327 avatar Apr 18 '24 08:04 yp05327

image It seems that this is not used in DB. 🤔

yp05327 avatar Apr 18 '24 12:04 yp05327

In locale: image image

yp05327 avatar Apr 18 '24 12:04 yp05327

image template: image image css: image js: image

yp05327 avatar Apr 18 '24 12:04 yp05327

I can check the frontend parts.

silverwind avatar Apr 18 '24 13:04 silverwind

I can check the frontend parts.

Thank you. And I think we should rename board -> column but still keep board view. Because we will have table view in future like what GH did.

lunny avatar Apr 18 '24 15:04 lunny

Looks like most frontend board usages are right.

lunny avatar Apr 20 '24 14:04 lunny

data-id="{{.ID}}" resolves to incorrect board_3. I don't think it's in use in frontend, so maybe it could be changed to just a number.

silverwind avatar Apr 21 '24 20:04 silverwind

JS and CSS look good to me. There is simplication possible like removing the board class but I will not do that in this PR.

silverwind avatar Apr 21 '24 21:04 silverwind

https://github.com/go-gitea/gitea/pull/30170/files#diff-f4279417070a8e33829c338abeb42877500377f490abb1495ae6357d50b6a765R46

plz check all locale It has been changed: image

yp05327 avatar Apr 30 '24 00:04 yp05327

Quote my comments above:

I would suggest do not merge it until 1.22.1 or 1.22.2, otherwise any bug fix would be difficult to backport

At least, wait for 1.22.0 to be stable.

And if those refactors are well-tested

The problem is, I didn't see how "those refactors are well-tested"

How to prove it is well-tested?

wxiaoguang avatar Apr 30 '24 03:04 wxiaoguang

Quote my comments above:

I would suggest do not merge it until 1.22.1 or 1.22.2, otherwise any bug fix would be difficult to backport

At least, wait for 1.22.0 to be stable.

And if those refactors are well-tested

The problem is, I didn't see how "those refactors are well-tested"

How to prove it is well-tested?

This is just a rename refactor, it will not change the previous logic. So I think the previous tests will still work if they exist. I don't know how should we add tests for the renaming behavior.

lunny avatar Apr 30 '24 03:04 lunny

This is just a rename refactor, it will not change the previous logic. So I think the previous tests will still work if they exist. I don't know how should we add tests for the renaming behavior.

It doesn't seem to be as simple as a renaming refactor. There are many "names" passed by string, no strict code check, and I guess there were some conflicts resolved manually.

So at least, I think every changed route handler and page should be tested manually?

wxiaoguang avatar Apr 30 '24 04:04 wxiaoguang