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

fix: display invalid tags as they are instead of hiding them #2714

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zaphoood
Copy link
Contributor

@Zaphoood Zaphoood commented May 5, 2022

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other

Description

If a formatting string contains an invalid/unsupported tag, it is displayed on the bar as-is in order to make the user aware that there's a mistake in their config.
Before, invalid tags would just be hidden.

Related Issues & Documents

Fixes #2713

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #2714 (0da197f) into master (f0dbb4c) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #2714   +/-   ##
=======================================
  Coverage   13.56%   13.57%           
=======================================
  Files         152      152           
  Lines       11357    11354    -3     
=======================================
  Hits         1541     1541           
+ Misses       9816     9813    -3     
Flag Coverage Δ
unittests 13.57% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/modules/meta/base.hpp 0.00% <ø> (ø)
include/modules/meta/base.inl 0.00% <0.00%> (ø)
src/modules/bspwm.cpp 0.00% <0.00%> (ø)
src/modules/meta/base.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0dbb4c...0da197f. Read the comment docs.

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

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

We unfortunately really need to use format->tags to check validity. I wish we could simplify the spacing calculations but it could potentially break a lot of configs.

include/modules/meta/base.inl Outdated Show resolved Hide resolved
include/modules/meta/base.inl Outdated Show resolved Hide resolved
src/modules/meta/base.cpp Outdated Show resolved Hide resolved
include/modules/meta/base.inl Outdated Show resolved Hide resolved
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.

[Bug]: invalid format tags don't throw exceptions
2 participants