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

feat(libs): Focus search field on app load #677

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

Angi-Kinas
Copy link
Collaborator

@Angi-Kinas Angi-Kinas commented Nov 8, 2023

Add manual change detection as described here

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Affected libs: feature-search, feature-router, feature-map, feature-dataviz, feature-record, ui-inputs, feature-editor, ui-elements, feature-catalog, ui-catalog, ui-search,
Affected apps: datahub, metadata-editor, demo, webcomponents, search, map-viewer, metadata-converter, datafeeder,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

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

Thanks! It looks like you unintentionally removed the line that was doing the focus, but I tested with the line re-added and it works well. Also I think this behavior should be configurable and disabled by default, otherwise it might disrupt the experience in other contexts e.g. the web component or the map viewer.

@@ -109,6 +109,7 @@ export class AutocompleteComponent
}

ngAfterViewInit(): void {
this.inputRef.nativeElement.focus()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you removed this line in the other commit, but you still need it otherwise the field is not focused

@Angi-Kinas Angi-Kinas force-pushed the DH-focus-search-field-on-app-load branch from b5abf7d to 95d5b8c Compare November 9, 2023 09:01
@coveralls
Copy link

coveralls commented Nov 9, 2023

Coverage Status

coverage: 81.939% (-4.7%) from 86.617%
when pulling f360092 on DH-focus-search-field-on-app-load
into 5f1c197 on main.

@Angi-Kinas Angi-Kinas force-pushed the DH-focus-search-field-on-app-load branch from 95d5b8c to 9d57305 Compare November 9, 2023 09:03
and resolve expression has changed after it was checked - error
see here: https://angular.io/errors/NG0100
and make focus configurable and diasbled by default
@Angi-Kinas Angi-Kinas force-pushed the DH-focus-search-field-on-app-load branch from 9d57305 to f360092 Compare November 9, 2023 10:27
Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@Angi-Kinas Angi-Kinas merged commit 1c1919e into main Nov 13, 2023
7 checks passed
@Angi-Kinas Angi-Kinas deleted the DH-focus-search-field-on-app-load branch November 13, 2023 07:40
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.

3 participants