You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/08/23 22:37:14 UTC
[GitHub] [superset] agl-developer opened a new pull request, #21172: fix(database-modal): Show a different placeholder text in Snowflake connection form
agl-developer opened a new pull request, #21172:
URL: https://github.com/apache/superset/pull/21172
When adding a new database and selecting Snowflake, the database and account fields had the same placeholder. This PR adds a placeholder prop so values can be sent dynamically by field
### SUMMARY
Adds an option to set a dynamic placeholder based on field.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before

After

### TESTING INSTRUCTIONS
- Click "Data" in the top nav and select "Databases"
- Click the "+ Database" in the top right corner of the page
- Select Snowflake database
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codyml commented on a diff in pull request #21172: fix(database-modal): Show a different placeholder text in Snowflake connection form
Posted by GitBox <gi...@apache.org>.
codyml commented on code in PR #21172:
URL: https://github.com/apache/superset/pull/21172#discussion_r954094039
##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx:
##########
@@ -85,10 +86,10 @@ export const databaseField = ({
value={db?.parameters?.database}
validationMethods={{ onBlur: getValidation }}
errorMessage={validationErrors?.database}
- placeholder={t('e.g. world_population')}
+ placeholder={t(placeholder ?? 'e.g. world_population')}
Review Comment:
I don't have a great sense of how translation strings work, but I wonder if this might break the build step of extracting translatable strings to have the argument of `t()` be dynamically set at render time. If you or someone else knows for sure definitely correct me, but would it be safer to have this just be `placeholder ?? t('e.g. world_population')` and instead call `t()` for `placeholder` where the string literal is defined in `superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx`?
##########
superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx:
##########
@@ -1607,6 +1615,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
}
getValidation={() => getValidation(db)}
validationErrors={validationErrors}
+ getPlaceholder={field => getPlaceholder(field)}
Review Comment:
Could this be done without defining a new inline function each render?
```suggestion
getPlaceholder={getPlaceholder}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #21172: fix(database-modal): Show a different placeholder text in Snowflake connection form
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #21172:
URL: https://github.com/apache/superset/pull/21172#issuecomment-1226271860
Storybook has completed and can be viewed at
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #21172: fix(database-modal): Show a different placeholder text in Snowflake connection form
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #21172:
URL: https://github.com/apache/superset/pull/21172#issuecomment-1226135946
# [Codecov](https://codecov.io/gh/apache/superset/pull/21172?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#21172](https://codecov.io/gh/apache/superset/pull/21172?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d222b3c) into [master](https://codecov.io/gh/apache/superset/commit/6a0b7e5598f18262cb83579bacd2440faaf5717b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6a0b7e5) will **decrease** coverage by `0.00%`.
> The diff coverage is `55.55%`.
> :exclamation: Current head d222b3c differs from pull request most recent head 8786866. Consider uploading reports for the commit 8786866 to get more accurate results
```diff
@@ Coverage Diff @@
## master #21172 +/- ##
==========================================
- Coverage 66.37% 66.37% -0.01%
==========================================
Files 1781 1781
Lines 67871 67880 +9
Branches 7239 7243 +4
==========================================
+ Hits 45047 45052 +5
- Misses 20966 20967 +1
- Partials 1858 1861 +3
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `52.30% <55.55%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/21172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...eModal/DatabaseConnectionForm/CommonParameters.tsx](https://codecov.io/gh/apache/superset/pull/21172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL0RhdGFiYXNlQ29ubmVjdGlvbkZvcm0vQ29tbW9uUGFyYW1ldGVycy50c3g=) | `85.71% <0.00%> (-4.29%)` | :arrow_down: |
| [...ase/DatabaseModal/DatabaseConnectionForm/index.tsx](https://codecov.io/gh/apache/superset/pull/21172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL0RhdGFiYXNlQ29ubmVjdGlvbkZvcm0vaW5kZXgudHN4) | `90.90% <0.00%> (-9.10%)` | :arrow_down: |
| [...c/views/CRUD/data/database/DatabaseModal/index.tsx](https://codecov.io/gh/apache/superset/pull/21172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsL2luZGV4LnRzeA==) | `32.20% <71.42%> (+0.67%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas merged pull request #21172: fix(database-modal): Show a different placeholder text in Snowflake connection form
Posted by GitBox <gi...@apache.org>.
rusackas merged PR #21172:
URL: https://github.com/apache/superset/pull/21172
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org