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

Improve Core Code Quality from Svelte Warnings #3563

Closed
ndricimrr opened this issue Dec 5, 2023 · 0 comments · Fixed by #3607
Closed

Improve Core Code Quality from Svelte Warnings #3563

ndricimrr opened this issue Dec 5, 2023 · 0 comments · Fixed by #3607
Assignees
Labels
internal Stuff like NFRs, CI pipeline refactoring Something needs to be refactored in a separate task

Comments

@ndricimrr
Copy link
Contributor

ndricimrr commented Dec 5, 2023

After introducing Vite we get nice warnings about new svelte code recomendations when running npm run build in core/

We might as well solve these issues to avoid having these warnings there instead of just enforcing a non-verbose vite build.

Looking at the warnings a lot of them are very small suggestions, that shouldn't do any harm. So we can start from the easier ones.

Following is generated summary that is more legible and helps to separate these issue into mini-tasks:

Note: Lots of good first issues can come out of this.

In issues for which the warnings make no sense for our use case, need to develop a solution, simple enough to disable the warnings if it just makes no sense. ex: "Unused export property" issues might be one of them.

Accessibility Issues (72 Issues):

Issue Type File Occurrences(s) Error/Warning Message
A11y: Missing href attribute for element TopNav.svelte, TabNav.svelte, LeftNav.svelte, SplitView.svelte, Authorization.svelte, AuthorizationSimpleProfileMenu.svelte, GlobalSearch.svelte 13 A11y: <a> element should have an href attribute
A11y: Missing keyboard event for clickable element TabNav.svelte, LeftNav.svelte, TopNav.svelte, GlobalNav.svelte, SplitView.svelte, etc 37 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
A11y: Noninteractive element with nonnegative tabIndex TopNav.svelte, etc 13 A11y: Noninteractive element cannot have nonnegative tabIndex value
A11y: Redundant role 'list' Authorization.svelte , UserSettingsDialog.svelte 2 A11y: Redundant role 'list'
A11y: Avoid using autofocus GlobalSearch.svelte 2 A11y: Avoid using autofocus
$: has no effect outside of the top-level App.svelte 5 $: has no effect outside of the top-level

Unused CSS Selectors (17 Occurrences):

File Occurrence(s) Unused Selector
App.svelte 5 -
ContextSwitcher.svelte 3 -
BadgeCounter.svelte 4 -
UserSettingsEditor.svelte 1 -
LeftNav.svelte 3 -
TopNav.svelte 1 -

Unused exports (7 Issues):

File Occurence(s) Error/Warning Message
TopNav.svelte 1 TopNav has unused export property 'urlAuthError'. If it is for external reference only, please consider using export const urlAuthError
UserSettingsEditor.svelte 1 UserSettingsEditor has unused export property 'userSettingsGroupKey'. If it is for external reference only, please consider using export const userSettingsGroupKey
UserSettingsDialog.svelte 1 UserSettingsDialog has unused export property 'schemaObj'. If it is for external reference only, please consider using export const schemaObj
GlobalSearch.svelte 1 GlobalSearch has unused export property 'displayCustomSearchResult'. If it is for external reference only, please consider using export const displayCustomSearchResult
GlobalSearchCentered.svelte 1 GlobalSearchCentered has unused export property 'displayCustomSearchResult'. If it is for external reference only, please consider using export const displayCustomSearchResult
Breadcrumb.svelte 2 Breadcrumb has unused export property 'hideNavComponent'. If it is for external reference only, please consider using export const hideNavComponent + Breadcrumb has unused export property 'responsiveNavSetting'. If it is for external reference only, please consider using export const responsiveNavSetting

Total Issues: 16

@ndricimrr ndricimrr added internal Stuff like NFRs, CI pipeline refactoring Something needs to be refactored in a separate task labels Dec 5, 2023
@ndricimrr ndricimrr changed the title Improve Core Code Quality from Vite Warnings Improve Core Code Quality from Svelte Warnings Dec 5, 2023
@camelCaseChris camelCaseChris self-assigned this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Stuff like NFRs, CI pipeline refactoring Something needs to be refactored in a separate task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants