-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Documentation for numeral pattern formatting #57616
Conversation
Pinging @elastic/kibana-docs (Team:Docs) |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
docs/management/numeral.asciidoc
Outdated
|
||
The `o` pattern will display a locale-specific positional value like `1st` or `2nd`. | ||
This pattern has limited support for localization, especially in languages | ||
with multiple forms such as German. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with multiple forms such as German. | |
with multiple forms, such as German. |
@@ -131,6 +131,8 @@ include::{kib-repo-dir}/management/managing-licenses.asciidoc[] | |||
|
|||
include::{kib-repo-dir}/management/managing-remote-clusters.asciidoc[] | |||
|
|||
include::{kib-repo-dir}/management/numeral.asciidoc[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the location of the doc here. The top-level items are related to UIs in the Management app. Can it go under Index Patters and Fields, so it is closer to Numeric Field Formatters.
If you decided to keep this as a top-level item under Management, move the item up so it is in alphabetical order like the rest of the topics in this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gchaps This is the one I think I need help with. The formatting options here are used in multiple places in Management, but also in TSVB and Canvas. It could even be a separate page at the top level, similar to the Limitations page, because it's used across Kibana. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wylieconlon GIven what you said, I think Management is the best place. I would move it so it appears between License Management and Remote Clusters.
Also, do you think it's worth mentioning in the doc the different places where numeral formatting is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Canvas changes LGTM 👍
I'll file an issue about accessing doc links in our i18n function help files so they show up in the Canvas expression editor autocomplete, but for now, having the links updated in the docs should be sufficient.
@@ -9,24 +9,22 @@ import { formatnumber } from '../../../canvas_plugin_src/functions/common/format | |||
import { FunctionHelp } from '../function_help'; | |||
import { FunctionFactory } from '../../../types'; | |||
import { NUMERALJS } from '../../constants'; | |||
// import { getDocumentationLinks } from '../../../public/lib/documentation_links'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we can't access doc links from our i18n strings since they don't live in /public
, but I think we should still figure out a way to insert a link into the help text here. This isn't a blocker for this PR. I'll file an issue to solve this later.
@@ -9,6 +9,7 @@ import { metric } from '../../../canvas_plugin_src/functions/common/metric'; | |||
import { FunctionHelp } from '../function_help'; | |||
import { FunctionFactory } from '../../../types'; | |||
import { FONT_FAMILY, FONT_WEIGHT, CSS, NUMERALJS } from '../../constants'; | |||
// import { getDocumentationLinks } from '../../../public/lib/documentation_links'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above ^
@elasticmachine merge upstream |
`format:number:defaultLocale`:: The http://numeraljs.com/[numeral language] locale. | ||
`format:number:defaultPattern`:: The default http://numeraljs.com/[numeral format] for the "number" format. | ||
`format:percent:defaultPattern`:: The default http://numeraljs.com/[numeral format] for the "percent" format. | ||
`format:number:defaultLocale`:: The <<numeral, numeral patteern>> locale. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo? patteern
@elasticmachine merge upstream |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I think @lizozom is on to something
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs LGTM
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-xpack-agent / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts·ts.spaces api with security resolve copy to spaces conflicts user with no access from the default space "before each" hook for "should return 404 when not overwriting, without references"Standard Out
Stack Trace
Kibana Pipeline / kibana-xpack-agent / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts·ts.spaces api with security resolve copy to spaces conflicts user with no access from the default space "before each" hook for "should return 404 when not overwriting, without references"Standard Out
Stack Trace
Kibana Pipeline / kibana-xpack-agent / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/resolve_copy_to_space_conflicts·ts.spaces api with security resolve copy to spaces conflicts user with no access from the default space "after each" hook for "should return 404 when not overwriting, without references"Standard Out
Stack Trace
History
To update your PR or re-run it, just comment with: |
Flakiness is unrelated to my change. Merging. |
* Documentation for Elastic Numeral formatting * Tweaks from feedback * Updates from feedback * Fix and update examples * Add TODOs * Fix typo Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
As part of our effort to move away from numeral, we are no longer relying on third-party docs. This PR creates a docs in
Management > Numeral Formatting
and links to that docs page instead of the third-party docs.Closes #57363
Checklist
Delete any items that are not applicable to this PR.