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

Clean html tags from code completion list #391

Closed
Tdue21 opened this issue Mar 26, 2019 · 6 comments · Fixed by #3877
Closed

Clean html tags from code completion list #391

Tdue21 opened this issue Mar 26, 2019 · 6 comments · Fixed by #3877
Assignees
Labels

Comments

@Tdue21
Copy link
Contributor

Tdue21 commented Mar 26, 2019

Is your feature request related to a problem? Please describe.
The list of code complete suggestions are not that big, it should scrub the html tags from the text that is shown.
Reserve the html for the actual description popup.
This would make it easier in some cases to see the text in the list of suggestions.

Describe the solution you'd like
No html tags in the suggestions list.

image

@Azhrei
Copy link
Member

Azhrei commented Mar 26, 2019

Yes, this is pretty easy to do. I wasn’t aware it was going to display like that — I was expecting the HTML to be interpreted. Maybe I just need to add ““ at the front...

@Azhrei Azhrei self-assigned this Mar 26, 2019
@Phergus Phergus added the bug label Aug 23, 2019
@thelsing
Copy link
Collaborator

Still an issue. @Azhrei do you still plan to work on this?

@Azhrei
Copy link
Member

Azhrei commented Dec 30, 2022

Still an issue. @Azhrei do you still plan to work on this?

Not any time soon. The string being displayed there is the string used as the “tooltip” that shows the entire wiki page. If all HTML tags are removed, the wiki page content will then be unformatted. 😕

There may be a way to create a second string via the API but I didn’t see one when I looked.

if someone else wants to take a crack at it, they definitely should. If it turns out that the properties file needs a new field, I can tweak the Python scripts that generate it.

@emmebi
Copy link
Collaborator

emmebi commented Mar 17, 2023

@Azhrei I was looking into this; I can see that in MapToolScriptAutoComplete we create BasicCompletion with a short description and a summary. Unless I am mistaken, the shortDesc is used in the suggestion list, and the summary for the actual description of the function. So, if we strip the tags from that, we should be ok.

If that's the case, feel free to assign the issue to me, I have some code for this (even though I am struggling at writing some tests for it, TBH).

@Azhrei
Copy link
Member

Azhrei commented Mar 17, 2023

I'm assigning this one to you, then.

In an ideal world, you'd do the stripping once and cache it somewhere (which is why I suggested we could rebuild the properties file with an additional key rather than do the work at runtime). Can the popup list simply be displayed as HTML instead of plain text? That would solve the problem and the formatting in the short description would be visible...

@Azhrei Azhrei assigned emmebi and unassigned Azhrei Mar 17, 2023
emmebi added a commit to emmebi/maptool that referenced this issue Mar 18, 2023
@emmebi
Copy link
Collaborator

emmebi commented Mar 18, 2023

I gave a try in the above PR; unfortunately, I didn't find any way to use HTML in the summary, so I had to go for the strip/cache approach.

emmebi added a commit to emmebi/maptool that referenced this issue Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants