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

Spinner in URLPopover positioned incorrectly #37070

Closed
wongjn opened this issue Dec 2, 2021 · 2 comments · Fixed by #43472
Closed

Spinner in URLPopover positioned incorrectly #37070

wongjn opened this issue Dec 2, 2021 · 2 comments · Fixed by #43472
Assignees
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@wongjn
Copy link

wongjn commented Dec 2, 2021

Description

The spinner loading indicator that can appear when typing in a URLPopover.LinkEditor component seems to be have incorrect layout due to invalid CSS properties for it.

Step-by-step reproduction instructions

  1. Log in to a WordPress 5.8.2 site.
  2. Add an Image (core/image) block.
  3. Click the Link button
  4. Type some characters into the link input box.

Screenshots, screen recording, code snippet

Incorrect compiled CSS is the right and bottom properties:

.block-editor-block-list__block .block-editor-url-input .components-spinner,
.components-popover .block-editor-url-input .components-spinner,
.block-editor-url-input .components-spinner {
  position: absolute;
  right: 8px 8px 8px 12px;
  bottom: 8px 8px 8px 12px8px1;
  margin: 0;
}

which is compiled from here:

right: $input-padding;
bottom: $input-padding + $grid-unit-10 + 1;

and also this is incorrect CSS for the bottom property:

.block-editor-url-popover__link-editor .block-editor-url-input .components-spinner,
.block-editor-url-popover__link-viewer .block-editor-url-input .components-spinner {
  bottom: 8px 8px 8px 12px1;
}

which is compiled from here:

This positions the spinner as below (see bottom left corner, the bit of gray is the spinner):
image

Here, I manually edited the bottom and right properties to 8px which improves it, but I am not sure what the ultimate value should be (one of the values from $input-padding I would presume?).
image

Environment info

WordPress 5.8.2, developing with a custom theme.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. General Interface Parts of the UI which don't fall neatly under other labels. z-index Discussions related to CSS z-index stacking. labels Dec 15, 2021
@Mamaduka
Copy link
Member

@jameskoster, @jasmussen, do you know if we can remove these styles after recent Spinner component refactoring?

@jameskoster
Copy link
Contributor

Quite possibly, yes. It doesn't look like these particular styles are used:

Screenshot 2022-08-11 at 09 46 08

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) and removed [Type] Enhancement A suggestion for improvement. General Interface Parts of the UI which don't fall neatly under other labels. z-index Discussions related to CSS z-index stacking. labels Aug 22, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants