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

Autocomplete problems after Bootstrap 5 upgrade #1301

Closed
osma opened this issue Apr 21, 2022 · 4 comments · Fixed by #1303 or #1304
Closed

Autocomplete problems after Bootstrap 5 upgrade #1301

osma opened this issue Apr 21, 2022 · 4 comments · Fixed by #1303 or #1304
Assignees
Labels
Milestone

Comments

@osma
Copy link
Member

osma commented Apr 21, 2022

At which URL did you encounter the problem?

https://dev.finto.fi/yso/en/

What steps will reproduce the problem?

  1. Search for e.g. "cat" in YSO and wait for the autocomplete popup

What is the expected output? What do you see instead?

This is how it works in finto.fi, running Skosmos 2.14:

kuva

Here is how it looks with current master branch (dev.finto.fi):

kuva

There are at least three problems:

  1. The entered string "cat" is shown with the wrong color. Minor CSS issue, probably in the Finto CSS file.
  2. Matches on altLabels (e.g. "Catalan people") don't show the prefLabel of the matched concept ("Catalans").
  3. The concept type information is missing.

This most likely broke with the Bootstrap 5 upgrade (PR #1182), which included an upgrade of the Typeahead.js widget.
Ping @kinow

What browser did you use? (eg. Firefox, Chrome, Safari, Internet explorer)

Firefox

@osma osma added the bug label Apr 21, 2022
@osma osma self-assigned this Apr 21, 2022
@kinow
Copy link
Collaborator

kinow commented Apr 21, 2022

This most likely broke with the Bootstrap 5 upgrade (PR #1182), which included an upgrade of the Typeahead.js widget.

Hi @osma! That does sound like a regression from #1182 👍 Will take a look next week (holiday this weekend/Monday).

@kinow
Copy link
Collaborator

kinow commented Apr 24, 2022

  1. The entered string "cat" is shown with the wrong color. Minor CSS issue, probably in the Finto CSS file.

Ah, that's an easy one to fix. @osma should we make the default to be that black/dark-gray from finto.fi, or leave as is?

Here's where we can change it to any other color:

color: var(--medium-color);

@osma
Copy link
Member Author

osma commented Apr 26, 2022

Ah, that's an easy one to fix. @osma should we make the default to be that black/dark-gray from finto.fi, or leave as is?

Right. Looking closer, it seems that this CSS block was added in PR #1182:

.form-control:focus {
background-color: var(--gray-100);
color: var(--medium-color);
border: none;
resize: none;
}

I'm not sure I understand the reason for this block. To me it seems that the only effective change is the text color, which is the problematic one. I tested dropping the whole block and couldn't see any problems with that. So I suggest that the block should be deleted, unless there is a reason for some of those rules.

@osma
Copy link
Member Author

osma commented Apr 26, 2022

PR #1303 fixed the functional issues (2, 3).

Reopening because of the font color issue (1). Also the font size on the buttons ("English", "Search" in above screenshots) is slightly larger (16px / 1rem) than it used to be (14px), which I hadn't noticed before. I'll soon open a PR fixing these as well.

@osma osma reopened this Apr 26, 2022
@osma osma added this to the 2.15 milestone Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants