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] always show the custom lookup #19

Merged
merged 2 commits into from
Nov 18, 2023

Conversation

marmoure
Copy link
Contributor

@marmoure marmoure commented Nov 8, 2023

Fixes #14
The Custom Look Up will always be shown on top even when we have matches results
always-show

@ttasovac
Copy link
Member

ttasovac commented Nov 8, 2023

@marmoure thanks a lot for this super quick implementation. could you please move the custom look up to appear below the matched results, so that it's easier for the user to select the matched result if they are correct.

@marmoure
Copy link
Contributor Author

marmoure commented Nov 8, 2023

@ttasovac
The order should be better now
i had to prefix every matched results with a space and pre fix the Custom Lookup... with double quotas
the order is being done by Oxygen XML following ASCII Table
image

@ttasovac
Copy link
Member

ttasovac commented Nov 9, 2023

thanks, @marmoure. i wonder if that's the only way to go about it. perhaps @adamretter can take a look as well?

@adamretter
Copy link
Collaborator

i wonder if that's the only way to go about it. perhaps @adamretter can take a look as well?

@ttasovac The difficulty we have is that we can only present a list of strings back to OxygenXML, and it is up to Oxygen how they order the list. They appear to sort the results lexicographically.

I am not sure I am completely clear on what you are asking for. Is the goal here to place Custom Entry... last in the list?

i had to prefix every matched results with a space and pre fix the Custom Lookup... with double quotas
the order is being done by Oxygen XML following ASCII Table

If the Goal is to place Custom Entry... last in the list, if we assume that the sorting is likely lexicographically based on the UTF-8 character set, all we need do is prefix Custom Entry... with some character (possibly non-visible) that has a higher character code than any that would likely appear in the normal results. Perhaps something like 👉 Custom Entry... would suffice? See: https://www.fileformat.info/info/emoji/point_right/index.htm

@ttasovac
Copy link
Member

Yes, indeed, the goal is for the lookup link to be last in the list.

👉 Custom Entry... looks good — people will think we added it on purpose and not as a hack! 😄 So let's do that. Thanks, Adam!

@marmoure
Copy link
Contributor Author

marmoure commented Nov 11, 2023

i still had to prefix the emoji with a space to bump it to the top
how does this look? @ttasovac
image

Also do you think we should keep the space in front of the emoji?
Here's the results without that space
image

@marmoure marmoure force-pushed the fix/custom-always branch 2 times, most recently from e50180b to 104186d Compare November 11, 2023 13:00
@ttasovac
Copy link
Member

@marmoure the goal is to have the link appear last, so I'm not sure why your screenshots have it appear between #frd and #bibl elements. we need a space between the emoji and "Custom lookup" string, but not before the emoji. Since we're looking at a dropdown list, an indentation in only one line makes it look a bit messy.

please try again — with an understanding that the custom lookup link should appear after all the results.

@marmoure
Copy link
Contributor Author

Sorry @ttasovac for the misunderstanding, My assumption was that 👉 Custom Lookup... should be after the results we got from TEI-Completer and before the ones Oxygen suggested
In this Case #frd came from TEI-Completer and #bibl were suggested by Oxygen
I have now pushed the 👉 Custom Lookup... to the bottom of the list, and i m still pushing the results from TEI-Completer to the top by prefixing with a Space
image
image

@adamretter adamretter merged commit 82081f7 into BCDH:master Nov 18, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom lookup option missing on matched selection
3 participants