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: remove comments on config values #2383

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ironAiken2
Copy link
Contributor

This PR Resolves #2382 Issue. (and minor fix on summary page's alert margin)

Why the bug occurred

Inside the config.toml file, a description of each value is included as a comment. These comments were being read together to prevent the default value from being used even when no value was provided.

Feature

  • Remove comments when reading config.toml values
  • Adjust the alert margin at the top of the summary page

Checklist: (if applicable)

  • Mention to the original issue
  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

@ironAiken2 ironAiken2 self-assigned this Apr 29, 2024
@github-actions github-actions bot added the size:S 10~30 LoC label Apr 29, 2024
Copy link

github-actions bot commented Apr 29, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 2.71% 118/4350
🔴 Branches 2.93% 87/2968
🔴 Functions 1.33% 19/1430
🔴 Lines 2.67% 114/4268

Test suite run success

32 tests passing in 4 suites.

Report generated by 🧪jest coverage report action from 20d0818

// overflow: 'auto',
alignItems: 'center',
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this. When the announcement has multiple lines, it's better to place a close button at the top instead of the middle.

const uncommentedValue =
typeof valueObj.value === 'string' && valueObj.value.includes('#')
? valueObj.value.split('#')[0].trim()
: '';
Copy link
Member

Choose a reason for hiding this comment

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

This is not a good idea because the value can have a #.

some="This#Value#has#"

Copy link
Member

Choose a reason for hiding this comment

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

If the current TOML parser does not support inline comments, please search for an alternative one that supports inline comments.

@ironAiken2 ironAiken2 marked this pull request as draft April 30, 2024 06:56
@ironAiken2 ironAiken2 force-pushed the fix/summary-page-app-download branch from 2f4edcd to 20d0818 Compare May 13, 2024 09:08
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ironAiken2 and the rest of your teammates on Graphite Graphite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S 10~30 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: The toml parser library needs to be replaced.
2 participants