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

Illustration picker #18565

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Conversation

AdrienClairembault
Copy link
Contributor

@AdrienClairembault AdrienClairembault commented Dec 17, 2024

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.

Description

Add a new illustration picker field.

Screenshots and videos

Selecting an icon: (open the full sized video in another tab to see more clearly)

demo

Illustration input:

image

Modal:

image

Searching for an icon (slowed down):

search

Using the pagination (slowed down):

pagination

Search with no results:

image

.tox.tox-tinymce {
border: var(--tblr-border-width) solid var(--tblr-border-color);
.tox.tox-tinymce:not(.content-editable-tinymce .tox.tox-tinymce) {
border: var(--tblr-border-width) solid var(--tblr-border-color) !important;
Copy link
Contributor Author

@AdrienClairembault AdrienClairembault Dec 17, 2024

Choose a reason for hiding this comment

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

Somewhat unrelated, I've noticed that some of tiynmce styles were not applied correctly (since I was trying to display a form field next to a tinymce field, the differences were very noticeable).

Fixed it and made the selector more precise as we don't want to impact the special .content-editable-tinymce class.

@@ -17,7 +17,6 @@ module.exports = {
"color-function-notation": null, // DISABLE: Expected modern color-function notation
"declaration-block-no-redundant-longhand-properties": null, // DISABLE Expected shorthand property "flex-flow"
"media-feature-range-notation": "prefix",
"selector-not-notation": "simple", //DISABLE Expected complex :not() pseudo-class notation
Copy link
Contributor Author

@AdrienClairembault AdrienClairembault Dec 17, 2024

Choose a reason for hiding this comment

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

I need a complex selector for a case that do not seems possible with simple selectors.

I've removed this rule, but it requires us to remove usages of simple selectors so I've had to fix a few existing css rules using the automated --fix command.

See https://stylelint.io/user-guide/rules/selector-not-notation/.

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't seem to be an issue. All officially supported browsers support selector lists.
https://caniuse.com/css-not-sel-list

@AdrienClairembault AdrienClairembault marked this pull request as ready for review December 17, 2024 16:29
Co-authored-by: Curtis Conard <cconard96@gmail.com>
Copy link
Contributor

@cconard96 cconard96 left a comment

Choose a reason for hiding this comment

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

Stuck to mainly a functional review.

  • The illustrations in the picker slightly overflow the bottom of their container on larger screens.
  • On smaller screens, the same layout of illustrations in the picker is used but the actual illustrations get smaller. Makes sense to keep the same illustration size and simply show less per row.

@AdrienClairembault
Copy link
Contributor Author

AdrienClairembault commented Dec 19, 2024

On smaller screens, the same layout of illustrations in the picker is used but the actual illustrations get smaller. Makes sense to keep the same illustration size and simply show less per row

Good catch, forgot to update the breakpoints. Should be fixed now.

Render on phones:

image

Render on tablets:

image

@AdrienClairembault
Copy link
Contributor Author

AdrienClairembault commented Dec 19, 2024

The illustrations in the picker slightly overflow the bottom of their container on larger screens.

Can you please share a screenshot of this issue ? I don't seems to reproduce it on my side.

@cconard96
Copy link
Contributor

The illustrations in the picker slightly overflow the bottom of their container on larger screens.

Can you please share a screenshot of this issue ? I don't seems to reproduce it on my side.

I cannot recreate the issue either now. I'm thinking it could have just been a random issue in Chrome. It wouldn't be the first time.

Copy link
Contributor

@orthagh orthagh left a comment

Choose a reason for hiding this comment

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

On the feature itself and the rendering -> nothing to say, it's very good.
While testing, I think we need a default neutral icon.
"Request a service" can't be this default.
I don't have an idea yet about how we should represent the concept

@trasher trasher merged commit 6344e60 into glpi-project:main Dec 20, 2024
9 checks passed
@trasher
Copy link
Contributor

trasher commented Dec 20, 2024

On the feature itself and the rendering -> nothing to say, it's very good. While testing, I think we need a default neutral icon. "Request a service" can't be this default. I don't have an idea yet about how we should represent the concept

Maybe open a ticket or add a task in project's backlog so it won't be firget

@AdrienClairembault
Copy link
Contributor Author

On the feature itself and the rendering -> nothing to say, it's very good. While testing, I think we need a default neutral icon. "Request a service" can't be this default. I don't have an idea yet about how we should represent the concept

Maybe open a ticket or add a task in project's backlog so it won't be firget

Done.

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 this pull request may close these issues.

4 participants