-
Notifications
You must be signed in to change notification settings - Fork 916
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
Chore/remove contributions #1843
Merged
ashwin-pc
merged 6 commits into
opensearch-project:feature/d-and-d
from
ashwin-pc:chore/remove-contributions
Jul 5, 2022
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fdb2544
adds min/max validation
ashwin-pc 9b635d9
relocated contributions
ashwin-pc 63d7137
Some more cleanup
ashwin-pc 0912724
minor fixes
ashwin-pc 1fbe959
one more unnecessary file
ashwin-pc efe98f0
fix: Seconday panel title
ashwin-pc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ainers/data_tab/field_selector_field.scss → ...onents/data_tab/field_selector_field.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...tributions/containers/data_tab/index.scss → ...pplication/components/data_tab/index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
@import "../../../util"; | ||
@import "../../util"; | ||
|
||
.wizDataTab { | ||
@include scrollNavParent; | ||
|
||
display: grid; | ||
grid-template-columns: 50% 50%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,5 +19,3 @@ export const DataTab = () => { | |
</div> | ||
); | ||
}; | ||
|
||
export * from './items'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ | |
*/ | ||
|
||
export { useDropbox } from './use_dropbox'; | ||
export { useFormField } from './use_form_field'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,29 +5,24 @@ | |
|
||
import { useState, useEffect, useCallback, useMemo } from 'react'; | ||
import { cloneDeep } from 'lodash'; | ||
import { BucketAggType, IndexPatternField, propFilter } from '../../../../../../../../data/common'; | ||
import { Schema } from '../../../../../../../../vis_default_editor/public'; | ||
import { FieldDragDataType } from '../../../../../utils/drag_drop/types'; | ||
import { useTypedDispatch, useTypedSelector } from '../../../../../utils/state_management'; | ||
import { DropboxState, DropboxDisplay } from '../types'; | ||
import { DropboxProps } from '../dropbox'; | ||
import { useDrop } from '../../../../../utils/drag_drop'; | ||
import { BucketAggType, IndexPatternField, propFilter } from '../../../../../../data/common'; | ||
import { Schema } from '../../../../../../vis_default_editor/public'; | ||
import { FieldDragDataType } from '../../../utils/drag_drop/types'; | ||
import { useTypedDispatch, useTypedSelector } from '../../../utils/state_management'; | ||
import { DropboxDisplay, DropboxProps } from '../dropbox'; | ||
import { useDrop } from '../../../utils/drag_drop'; | ||
import { | ||
editAgg, | ||
reorderAgg, | ||
updateAggConfigParams, | ||
} from '../../../../../utils/state_management/visualization_slice'; | ||
import { useIndexPattern } from '../../../../../../application/utils/use/use_index_pattern'; | ||
import { useOpenSearchDashboards } from '../../../../../../../../opensearch_dashboards_react/public'; | ||
import { WizardServices } from '../../../../../../types'; | ||
} from '../../../utils/state_management/visualization_slice'; | ||
import { useIndexPattern } from '../../../utils/use/use_index_pattern'; | ||
import { useOpenSearchDashboards } from '../../../../../../opensearch_dashboards_react/public'; | ||
import { WizardServices } from '../../../../types'; | ||
|
||
const filterByName = propFilter('name'); | ||
const filterByType = propFilter('type'); | ||
|
||
export const INITIAL_STATE: DropboxState = { | ||
instances: [], | ||
}; | ||
|
||
export interface UseDropboxProps extends Pick<DropboxProps, 'id' | 'label'> { | ||
schema: Schema; | ||
} | ||
|
@@ -192,6 +187,8 @@ export const useDropbox = (props: UseDropboxProps): DropboxProps => { | |
}; | ||
}, [aggService.types, dragData, indexPattern?.fields, schema.aggFilter, schema.group]); | ||
|
||
const canDrop = validAggTypes.length > 0 && schema.max > dropboxAggs.length; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is where we validate if the user can drop more fields |
||
|
||
return { | ||
id: dropboxId, | ||
label, | ||
|
@@ -203,7 +200,7 @@ export const useDropbox = (props: UseDropboxProps): DropboxProps => { | |
onReorderField, | ||
...dropState, | ||
dragData, | ||
isValidDropTarget: validAggTypes.length > 0, | ||
isValidDropTarget: canDrop, | ||
dropProps, | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit - fallback value should be an i18n string defined somewhere else. But I think we should add a cleanup task at the end that's a sweep for strings, so that we can get them all in one pass.
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.
We do have a task #958 for this