Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Removes trailing and leading special chars from value dimension label #10

Conversation

andres-rubio-go
Copy link

No description provided.

src/viz_gauge.js Outdated
@@ -136,7 +136,7 @@ function processPivot(data, queryResponse, config, viz, pivotKey) {
value_dimension:
config.value_label_override === undefined ||
config.value_label_override === ''
? pivotKey
? pivotKey.replace(/(^| +)[!-\/:-@\[-`\{-~]*([^ ]*?)[!-\/:-@\[-`\{-~]*(?=\s|$)/gi, '$1$2')
Copy link

Choose a reason for hiding this comment

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

  1. Please extract this into a separate function.
  2. Also create a constant for the regular expression.
  3. We need to check whether it's only the '$' sign or other special symbols as well.
  4. We'll also need to include before and after screenshots on the associated issue.

Copy link

Choose a reason for hiding this comment

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

  1. Please also add unit tests using Jest.

@yjmg yjmg merged commit 4b50f5a into looker-open-source:master Jul 5, 2023
jeremytchang pushed a commit that referenced this pull request Jan 3, 2024
🤖 I have created a release *beep* *boop*
---


## 1.0.0 (2024-01-03)


### Features

* add jest for unit testing
([#11](#11))
([76a5e49](76a5e49))
* some unit tests for some more utility functions.
([#12](#12))
([1ccc019](1ccc019))


### Bug Fixes

* Removes trailing and leading special chars from value dimension label
([#10](#10))
([4b50f5a](4b50f5a))
* Viz not updating after filter added or changed
([2c0e133](2c0e133))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants