Add support for tags
#1002
Merged
mmarif
merged 27 commits from qwerty287/GitNex:tags
into main
5 months ago
Reviewers
Request review
No reviewers
Labels
Requires and waits for changes in Gitea's API Backport
Bugfix ported to a release branch for point release Blocked
Waits for something else that must be solved first Brainstorming Breaking
Contains or will result in breaking changes Bug Cannot-reproduce Changelog CI
Related to the CI/CD Cleanup Confirmed Discussion Documentation Duplicate Enhancement External-dependecy F-droid Feature Frontport Good-first-issue Google-play Has-backport Improvement Invalid Investigate Long-term Major-release Minor-release Needs-backport Needs-cleanup Needs-feedback Needs-frontport Needs-help Performance Priority-critical Priority-high Priority-low Priority-medium Question Ready Refactor Regression Release Repository
Related to this repository and it's management Security Suggestion Summary Support Testing Translation UI/UX
Related to the user interface or experience Upstream Website
Related to the website Wontfix
This won't get fixed
Apply labels
Clear labels
API-dependency
Requires and waits for changes in Gitea's API Backport
Bugfix ported to a release branch for point release Blocked
Waits for something else that must be solved first Brainstorming Breaking
Contains or will result in breaking changes Bug Cannot-reproduce Changelog CI
Related to the CI/CD Cleanup Confirmed Discussion Documentation Duplicate Enhancement External-dependecy F-droid Feature Frontport Good-first-issue Google-play Has-backport Improvement Invalid Investigate Long-term Major-release Minor-release Needs-backport Needs-cleanup Needs-feedback Needs-frontport Needs-help Performance Priority-critical Priority-high Priority-low Priority-medium Question Ready Refactor Regression Release Repository
Related to this repository and it's management Security Suggestion Summary Support Testing Translation UI/UX
Related to the user interface or experience Upstream Website
Related to the website Wontfix
This won't get fixed
No Label
API-dependency
Backport
Blocked
Brainstorming
Breaking
Bug
Cannot-reproduce
Changelog
CI
Cleanup
Confirmed
Discussion
Documentation
Duplicate
Enhancement
External-dependecy
F-droid
Feature
Frontport
Good-first-issue
Google-play
Has-backport
Improvement
Invalid
Investigate
Long-term
Major-release
Minor-release
Needs-backport
Needs-cleanup
Needs-feedback
Needs-frontport
Needs-help
Performance
Priority-critical
Priority-high
Priority-low
Priority-medium
Question
Ready
Refactor
Regression
Release
Repository
Security
Suggestion
Summary
Support
Testing
Translation
UI/UX
Upstream
Website
Wontfix
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
This pull request currently doesn't have any dependencies.
Reference in new issue
There is no content yet.
Delete Branch 'qwerty287/GitNex:tags'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
Closes #983
TODO
You can add pagination if you would like.
I know, forgot in todo list
WIP: Add support for tagsto Add support for tags 9 months agoI think it's ready
Thanks, I will review it soon when get some time.
Bdw, the pagination implementation with viewmodel will not work properly. Have you test it?
Yes, and for me it's working (but it uses a simple workaround, just send the adapter as a parameter of the function, maybe that's what you mean)
Can we add a progress indicator when we switch with filter, and for pages load?
For creating tag, If I tap on create tag. Will it create a release too or just tag?
Maybe we can enhance creating release screen to accomodate tag properly.
private String repoOwner;
private String releaseTag;
private boolean viewTypeIsTags = false;
private int page = 1;
Just initlization would work,
private int page;
Well, I tried this and in this case
page
was 0 at the beginning, it must be 1.Call<List<GitTag>> call = RetrofitClient
.getApiInterface(ctx)
.getTags(token, owner, repo, 1, 50);
Page limit should come from
helpers/Constants
. Our default is 25 for new and 10 for old.Call<List<GitTag>> call = RetrofitClient
.getApiInterface(ctx)
.getTags(token, owner, repo, page, 50);
Page limit should come from
helpers/Constants
. Our default is 25 for new and 10 for old.<string name="tagCreated">Tag created</string>
<string name="asRef">Use as reference</string>
<string name="deleteTagConfirmation">Do you really want to delete this tag?</string>
<string name="deleteTagTitle">Delete tag %s</string>
How to delete a tag?
There should be a button with three dots next to the tag name in the list, there is the option.
Unfortunately I don't see one. I am on GitNex repo.
Ok, I'll see what's wrong.
Oh, I missed the permission system. I added the values used in #977 and currently this will always be false and it will be hidden... I'll disable the permission check so we can enable it if #977 is merged
Could you try again with this
d27b0e0db7
?And while you are at it, can you add pagination to Releases too?
@mmarif
Sure!
Only the tag
I mostly copied this ui from gitea itself, but yes that would be probably good.
@mmarif
Requires a tea4j update, but yes I can do this👍
<string name="selectUpdateStrategy">Select Update Strategy</string>
<string name="tags">Tags</string>
<string name="releasesTags">Releases/Tags</string>
<string name="create_tag">Create Tag</string>
As it is following the web UI, in that case can you change the button text to
Create Tag Only
49ce876332
@qwerty287 can you add a check and only show this if gitea instance is >= 1.15 ?
conflicts :D
@qwerty287 can you fix the conflicts?
This
@string/labelMenuDelete
does not exist inbottom_sheet_tag_in_list.xml
. Am I missing something?It does in line 21 - 34?
@qwerty287
Sorry I was not clear. I mean that string is missing in strings.xml.
Yes, fixed it.
enableProcessButton();
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle),
ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage),
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton),
This should be
R.string.cancelButton
as there is no such string foralertDialogTokenRevokedCopyNegativeButton
.AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle),
ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage),
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton),
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
This should be
R.string.navLogout
instead ofalertDialogTokenRevokedCopyPositiveButton
. No such string.Can you help build the app from this PR to fix the missing bits. Thanks
@qwerty287 this is ready for mergning. Just one thing I wish was there, when delete a tag, refresh the view with updated list. But it can be done in another PR.
f79d227bff
into main 5 months agoReviewers
f79d227bff
.