Skip to content
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

Release 3.15 with Hotfix 1644 #1650

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "JDN",
"description": "JDN – helps Test Automation Engineer to create Page Objects in the test automation framework and speed up test development",
"devtools_page": "index.html",
"version": "3.15.0",
"version": "3.15.1",
"icons": {
"128": "icon128.png"
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jdn-ai-chrome-extension",
"version": "3.15.0",
"version": "3.15.1",
"description": "jdn-ai chrome extension",
"scripts": {
"start": "webpack --watch --env devenv",
Expand Down
2 changes: 1 addition & 1 deletion src/app/utils/compatibleVersions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const compatibleMajorVer = 0;
export const compatibleMinorVer = 2;
export const compatibleBuildVer = 41;
export const compatibleBuildVer = 62;
11 changes: 5 additions & 6 deletions src/features/locators/components/LocatorsTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { selectCurrentPageObject } from '../../pageObjects/selectors/pageObjects
import { selectPresentLocatorsByPO } from '../selectors/locatorsByPO.selectors';
import { selectFilteredLocators } from '../selectors/locatorsFiltered.selectors';
import { isLocatorListPage } from '../../../app/utils/helpers';
import type RcTree from 'rc-tree';

export enum SearchState {
None = 'none',
Expand Down Expand Up @@ -52,7 +53,7 @@ export const LocatorsTree: React.FC<LocatorTreeProps> = ({ locatorIds, viewProps
const [autoExpandParent, setAutoExpandParent] = useState(true);

const containerRef = useRef<HTMLDivElement>(null);
const treeRef = useRef(null);
const treeRef = useRef<RcTree>(null);

const containerHeight = useSize(containerRef)?.height;

Expand Down Expand Up @@ -152,12 +153,9 @@ export const LocatorsTree: React.FC<LocatorTreeProps> = ({ locatorIds, viewProps
if (scrollToLocator) {
setTimeout(() => {
// antd docs for scrollTo https://github.com/ant-design/ant-design/blob/master/components/tree/index.en-US.md#tree-methods
treeRef.current &&
containerHeight &&
// bug in ant's typings, impossible to create correct ref type
// eslint-disable-next-line
// @ts-ignore
if (treeRef.current && containerHeight) {
treeRef.current.scrollTo({ key: scrollToLocator, align: 'top', offset: containerHeight / 2 });
}
}, 500);
}
}, [expandedKeys]);
Expand All @@ -173,6 +171,7 @@ export const LocatorsTree: React.FC<LocatorTreeProps> = ({ locatorIds, viewProps
{...{ expandedKeys, onExpand, autoExpandParent }}
switcherIcon={<CaretDown color="#878A9C" size={14} />}
treeData={treeNodes}
height={containerHeight || 0} // necessary for scrollTo works
style={{ height: 'inherit' }}
/>
</div>
Expand Down
Loading