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

[Search:WebCrawlers:ViewCrawler:Manage Domains page]Incorrect error placement after Saving Extraction rules #199154

Closed
L1nBra opened this issue Nov 6, 2024 · 6 comments · Fixed by #202980
Assignees
Labels
defect-level-2 Serious UX disruption with workaround impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Accessibility Team:Search WCAG A

Comments

@L1nBra
Copy link

L1nBra commented Nov 6, 2024

Description
Errors are clear and present for the user where he/she can easily see them in order to fix it.

Preconditions
Stateful Web crawlers -> View Crawler -> Manage Domains page, Extraction rules tab is opened.
Domain is added.

Steps to reproduce

1.Navigate to Add content extraction rule button by pressing Tab key.
2.Press Enter.
3.Navigate to Rule description field.
4.Enter any text (f.e. Test Title).
5.Navigate to Save rule button.
6.Press Enter.
7.Observe the page.

UI elements
Image

Image

Actual Result

  • Error appears on top of the page and shortly disappears. Without scrolling up, user doesn't see the error.

Expected Result

  • Either error should appear as notification or at the bottom of the page, otherwise user can not be aware of it.

Meta Issue

Kibana Version: 8.17.0-SNAPSHOT

OS: Windows 11 Pro

Browser: Chrome Version 130.0.6723.70 (Official Build) (64-bit)

WCAG or Vendor Guidance (optional)

Related to: https://github.com/elastic/search-team/issues/8256

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 6, 2024
@L1nBra L1nBra added WCAG A impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. defect-level-2 Serious UX disruption with workaround Team:Search labels Nov 6, 2024
@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 6, 2024
@navarone-feekery navarone-feekery self-assigned this Nov 22, 2024
@navarone-feekery
Copy link
Contributor

navarone-feekery commented Nov 22, 2024

Investigated and determined that the current notice can't be moved. It's a server error from an invalid request, and moving it or changing how it works will impact the entire Search plugin.
What can be done is to add a local validation. This would probably be 0.5 ~ 1 days work.

@navarone-feekery
Copy link
Contributor

This is the file where the validation will need to be done:
https://github.com/elastic/kibana/blob/main/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawler_domain_detail/extraction_rules/edit_extraction_rule.tsx

Values for the rules to be validated are under the variable ruleFields

@navarone-feekery navarone-feekery removed their assignment Nov 25, 2024
@navarone-feekery
Copy link
Contributor

I haven't started this, only investigated, and the deadline has been updated so I've unassigned myself to focus on other issues.

@erikcurrin-elastic
Copy link

Requires input validation to place the message appropriately.

@navarone-feekery
Copy link
Contributor

PR that adds more validations to the form to prevent the server error from occurring: #202980

@erikcurrin-elastic erikcurrin-elastic added loe:small Small Level of Effort and removed a11y:low-effort labels Dec 4, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 27, 2024
## Closes: elastic#199154

This adds more validations to the Crawler extraction rules form.

The original issue of the error being at the top of the page is not
easily fixable, as it's a catch-all server error display. Ideally, we
shouldn't have server errors occurring at all, so it makes sense to me
to just add a front-end validation to the inputs in this field.

These validations cover the following previously-missed scenarios:

1. When a user has not added any rules
2. When rule is for a specific URL and the URL pattern field is empty,
or doesn't begin with `/`
3. When the value for "Source" is empty (covers both HTML element and
URL selectors)
4. When "Content" is "A fixed value" and the value field is empty

(cherry picked from commit 9865da3)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 27, 2024
## Closes: elastic#199154

This adds more validations to the Crawler extraction rules form.

The original issue of the error being at the top of the page is not
easily fixable, as it's a catch-all server error display. Ideally, we
shouldn't have server errors occurring at all, so it makes sense to me
to just add a front-end validation to the inputs in this field.

These validations cover the following previously-missed scenarios:

1. When a user has not added any rules
2. When rule is for a specific URL and the URL pattern field is empty,
or doesn't begin with `/`
3. When the value for "Source" is empty (covers both HTML element and
URL selectors)
4. When "Content" is "A fixed value" and the value field is empty

(cherry picked from commit 9865da3)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 27, 2024
## Closes: elastic#199154

This adds more validations to the Crawler extraction rules form.

The original issue of the error being at the top of the page is not
easily fixable, as it's a catch-all server error display. Ideally, we
shouldn't have server errors occurring at all, so it makes sense to me
to just add a front-end validation to the inputs in this field.

These validations cover the following previously-missed scenarios:

1. When a user has not added any rules
2. When rule is for a specific URL and the URL pattern field is empty,
or doesn't begin with `/`
3. When the value for "Source" is empty (covers both HTML element and
URL selectors)
4. When "Content" is "A fixed value" and the value field is empty

(cherry picked from commit 9865da3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect-level-2 Serious UX disruption with workaround impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Accessibility Team:Search WCAG A
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants