Skip to content

Commit

Permalink
[VisBuilder] Add TODOs with issue links, fix test ID
Browse files Browse the repository at this point in the history
Restores previous test ID for count field button

Signed-off-by: Josh Romero <[email protected]>
  • Loading branch information
joshuarrrr committed Nov 4, 2022
1 parent e1c386c commit f1b750b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const Field = ({ field, getDetails }: FieldProps) => {
closePopover={() => setOpen(false)}
anchorPosition="rightUp"
panelClassName="vbItem__fieldPopoverPanel"
// TODO: make reposition on scroll actually work: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2782
repositionOnScroll
data-test-subj="field-popover"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface IFieldCategories {
export const FieldSelector = () => {
const indexPattern = useIndexPatterns().selected;
const fieldSearchValue = useTypedSelector((state) => state.visualization.searchField);
// TODO: instead of a single fetch of sampled hits for all fields, we should just use the agg service to get top hits or terms per field: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2780
const hits = useSampleHits();
const [filteredFields, setFilteredFields] = useState<IndexPatternField[]>([]);

Expand Down Expand Up @@ -77,6 +78,8 @@ export const FieldSelector = () => {
<DraggableFieldButton
field={{ name: 'count', displayName: 'Count', type: 'number' }}
dragValue={COUNT_FIELD}
// TODO: improve the test ID for the Count field (or use a non-conflicting `name` value) and update functional test accordingly: https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/6f4125c9823f8e54e138076737ca16f011cbd7e7/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/vis_builder/vis_types/metric.spec.js#L36
dataTestSubj="field-undefined-showDetails"
/>
<FieldGroup
id="categoricalFields"
Expand Down

0 comments on commit f1b750b

Please sign in to comment.