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

Reduce jQuery UI imports and use Bootstrap tooltips #1340

Merged
merged 3 commits into from
May 4, 2020
Merged

Reduce jQuery UI imports and use Bootstrap tooltips #1340

merged 3 commits into from
May 4, 2020

Conversation

Hirse
Copy link
Contributor

@Hirse Hirse commented Apr 30, 2020

This PR has two changes that are not easily possible to split.

Currently, ungit is (unintentionally probably) using the jQuery UI tooltips instead of the bootstrap ones.

  1. Only import the jQuery UI widgets that are used, i.e. autocomplete

    • Switch from jquery-ui-bundle to jquery-ui package
    • Add a new file that managest the jQuery UI import
    • Remove jQuery UI styles import as we use our own (see Style autocompletes like dropdowns #1327)
    • Replace jQuery UI styles import with only core styles, thanks for the hint @ylecuyer
  2. Add custom styling to bootstrap tooltips

  3. Fix placement of tooltips in button groups


image image

@Hirse
Copy link
Contributor Author

Hirse commented Apr 30, 2020

I just replaced the jQuery UI package in the dependencies, but was wondering if it makes more sense to move it to devDependencies, since it is only used when building the bundle file.

@campersau What do you think?

@campersau
Copy link
Collaborator

When selecting a directory in the autocomplete a text gets displayed at the bottom.
image

There is also a general bug where tooltips are not initialized until a git directory is opened if you like to fix that too.
image

Not quite sure about moving jquery-ui to devDependencies yet.

@ylecuyer
Copy link
Contributor

ylecuyer commented May 1, 2020

When selecting a directory in the autocomplete a text gets displayed at the bottom.
image

It seems you need to include core.css and autocomplete.css (cf https://www.drupal.org/project/aloha/issues/1827626#comment-6672476) (https://github.com/jquery/jquery-ui/tree/c6f1735249295bb37153861aa97e5b3e38d46b02/themes/base) I tried and it works well

@ylecuyer
Copy link
Contributor

ylecuyer commented May 1, 2020

There is also a general bug where tooltips are not initialized until a git directory is opened if you like to fix that too.
image

I have made #1343

@Hirse
Copy link
Contributor Author

Hirse commented May 2, 2020

When selecting a directory in the autocomplete a text gets displayed at the bottom.

It seems you need to include core.css and autocomplete.css (cf https://www.drupal.org/project/aloha/issues/1827626#comment-6672476) (https://github.com/jquery/jquery-ui/tree/c6f1735249295bb37153861aa97e5b3e38d46b02/themes/base) I tried and it works well

I was trying to avoid having to add any CSS from jQuery-UI.
I'll see if we can include (or copy) just the rules we need.
(Generally, I would not want to copy anything, but in this case we don't need to worry about future maintenance as jQuery-UI is not getting any updates.)

@Hirse
Copy link
Contributor Author

Hirse commented May 2, 2020

@campersau, fixed the issue as @ylecuyer suggested by adding the jQuery-UI core.css (back) to our CSS/Less.

@campersau campersau merged commit 7146620 into FredrikNoren:master May 4, 2020
@Hirse Hirse deleted the jquery-ui branch May 4, 2020 16:00
@campersau campersau mentioned this pull request May 5, 2020
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.

None yet

3 participants