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

Small adjustments #362

Merged
merged 6 commits into from
Mar 27, 2024
Merged

Small adjustments #362

merged 6 commits into from
Mar 27, 2024

Conversation

SimonSimCity
Copy link
Collaborator

Just some things I saw could do good of some improvements in the last PRs.

Why I implemented Dynamic width for context menu is best explained in these two screenshots:

Before:
before
After:
after

Since the "icon-only" property should only be set when the slot is empty and vv, we can replace it by checking if slot contains a value.
By this we gain route-parameter validation by types.
For the profile-menu, width was replaced by min-width in addition, and the dynamic width does not take the list of content-language, as it can become quite long.
@SimonSimCity SimonSimCity requested a review from kkuepper March 26, 2024 14:40
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 102 lines in your changes are missing coverage. Please review.

Project coverage is 8.43%. Comparing base (66d2bc6) to head (7da1b46).

Files Patch % Lines
components/PrivatePlaylistMenu.vue 0.00% 26 Missing ⚠️
pages/search/[[term]].vue 0.00% 14 Missing ⚠️
pages/playlist/contributor/[id]/index.vue 0.00% 10 Missing ⚠️
components/RecommendationItem.vue 0.00% 9 Missing ⚠️
pages/playlist/podcast/[id]/index.vue 0.00% 9 Missing ⚠️
components/DocumentList.vue 0.00% 7 Missing ⚠️
components/ButtonStyled.vue 0.00% 5 Missing ⚠️
pages/track/[id]/[...language].vue 0.00% 4 Missing ⚠️
pages/track/[id]/index.vue 0.00% 4 Missing ⚠️
components/GenericListItem.vue 0.00% 3 Missing ⚠️
... and 7 more
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #362      +/-   ##
========================================
- Coverage   8.46%   8.43%   -0.03%     
========================================
  Files        116     116              
  Lines       6663    6686      +23     
  Branches     217     217              
========================================
  Hits         564     564              
- Misses      5988    6011      +23     
  Partials     111     111              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-meadow-01b17e903-362.westeurope.3.azurestaticapps.net

if (shuffledTracks) {
setQueue(shuffledTracks);
}
} catch (e) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't like that every api call needs to be wrapped in a try catch. I'd prefer if we detect the error in the middleware and show a message. Then not every component needs to do it itself.

Copy link
Collaborator Author

@SimonSimCity SimonSimCity Mar 26, 2024

Choose a reason for hiding this comment

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

That's part of #33. I wouldn't do this in a middleare, because some errors are expected to be handled, others are rather general. I'd rather wrap them all in a wrapper where the caller itself can handle the expected ones and let the wrapper catch all other errors, which should also be reported differently, IMO. That's also why I'm rather against the current implementation of error reporting.

I think this is best to discuss in a meeting on discord.I have quite a distinct meaning about this, but don't know how you've done it in the past.

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-meadow-01b17e903-362.westeurope.3.azurestaticapps.net

@SimonSimCity SimonSimCity merged commit ae97c8d into main Mar 27, 2024
8 of 10 checks passed
@SimonSimCity SimonSimCity deleted the small-adjustments branch March 27, 2024 08:16
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.

2 participants