Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix topic bar to allow prefixes #7325

Merged
merged 8 commits into from
Jun 30, 2019
Merged

Conversation

Cherrg
Copy link
Contributor

@Cherrg Cherrg commented Jun 28, 2019

  • do not select if escape is pressed
  • allow prefixes by adding current request content to result list
  • remove/escape html-tags before insert on page

Update

  • sort typed word to top
  • remove already present topics from dropdown list

fix #7126 (Unable to create a new topic because it's a substring of an existing one)

Signed-off-by: Michael Gnehr [email protected]

- allow prefixes by adding current request content to result list
- remove html-tags before insert on page

fix go-gitea#7126

Signed-off-by: Michael Gnehr <[email protected]>
@mrsdizzie
Copy link
Member

This looks better thank you! Would it be possible instead of (or in addition to) adding the current request to the list to also not show something that is already a tag (or been entered but not yet saved in the current session).

So as an example here:

Screen Shot 2019-06-28 at 12 57 46 PM

It shouldn't show golang as a suggestion since it has already been selected and will just disappear if you try to pick it a second time.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 28, 2019
Signed-off-by: Michael Gnehr <[email protected]>
@codecov-io
Copy link

codecov-io commented Jun 28, 2019

Codecov Report

Merging #7325 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7325      +/-   ##
==========================================
- Coverage   41.24%   41.23%   -0.01%     
==========================================
  Files         466      466              
  Lines       63153    63153              
==========================================
- Hits        26045    26043       -2     
- Misses      33702    33705       +3     
+ Partials     3406     3405       -1
Impacted Files Coverage Δ
models/unit.go 62.16% <0%> (-5.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff85dd3...10a0703. Read the comment docs.

@mrsdizzie
Copy link
Member

Still looks like it shows already selected tags as suggestions (unless I'm doing something wrong):

tags (2)

@Cherrg
Copy link
Contributor Author

Cherrg commented Jun 28, 2019

i didn't notice that there where other class names for previously present topics and new added ones.
Should be better now

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 28, 2019
@mrsdizzie
Copy link
Member

mrsdizzie commented Jun 28, 2019

That looks great thank you for all of these PRs they really add up!

@lunny lunny added the type/bug label Jun 29, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 29, 2019
@lunny lunny added this to the 1.9.0 milestone Jun 29, 2019
public/js/index.js Outdated Show resolved Hide resolved
@silverwind
Copy link
Member

Please don't land yet until above comment is resolved (seems I lack permission to block this PR via negative review).

Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per @silverwind

@zeripath
Copy link
Contributor

Don't worry I'm fairly certain our merging stuff wouldn't let us merge in any case.

@silverwind
Copy link
Member

Should be good to go.

@zeripath zeripath merged commit 8ab2d31 into go-gitea:master Jun 30, 2019
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 2019
* - do not select if escape is pressed
- allow prefixes by adding current request content to result list
- remove html-tags before insert on page

fix go-gitea#7126

Signed-off-by: Michael Gnehr <[email protected]>

* sort current query to top

Signed-off-by: Michael Gnehr <[email protected]>

* remove already added topics from dropdown list

Signed-off-by: Michael Gnehr <[email protected]>

* protoct against xss

thanks to @silverwind

Signed-off-by: Michael Gnehr <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to create a new topic because it's a substring of an existing one
7 participants