Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

use office-fabric-ui components #1964

Merged
merged 14 commits into from
Feb 10, 2020
Merged

Conversation

lvybriage
Copy link
Contributor

@lvybriage lvybriage commented Jan 16, 2020

This PR‘s content:

  • use office-fabric-ui , delete antd dependency
  • refactor nav bar
  • refactor addColumn modal

improvement

  • table: 击selecte icon可以选中一行但不需要打开expand row [调试中,有bug, 期待bug bash进]
  • trial's intermediate result graph: x轴名称改为trial sequence id

support items in next release:

  • Parameters | Log in open row: div保持一样的高度
  • tableList pagination function
  • 单独的refresh button function

@lvybriage lvybriage mentioned this pull request Jan 20, 2020
@@ -373,136 +388,132 @@ class TableList extends React.Component<TableListProps, TableListState> {
parameterStr.push(`${value} (search space)`);
});
}
let showTitle = COLUMNPro; // eslint-disable-line @typescript-eslint/no-unused-vars
showTitle = COLUMNPro.concat(parameterStr);

// only succeed trials have final keys
if (tableSource.filter(record => record.status === 'SUCCEEDED').length >= 1) {
const temp = tableSource.filter(record => record.status === 'SUCCEEDED')[0].accuracy;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temp: better to give it a meaningful name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks

@@ -2,8 +2,9 @@
const METRIC_GROUP_UPDATE_THRESHOLD = 100;
const METRIC_GROUP_UPDATE_SIZE = 20;

const MANAGER_IP = `/api/v1/nni`;
const MANAGER_IP = `http://13.77.78.63:8080/api/v1/nni`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this ip address?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

watchOptions: {
ignored: ignoredFiles(paths.appSrc),
},
// Enable HTTPS if the HTTPS environment variable is set to 'true'
https: protocol === 'https',
host: host,
host,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove host:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同名可以简写~ 这是项目生成时的文件,我其实并没有改什么...

'Setting NODE_PATH to resolve modules absolutely has been deprecated in favor of setting baseUrl in jsconfig.json (or tsconfig.json if you are using TypeScript) and will be removed in a future major release of create-react-app.'
)
);
console.log();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty content

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had delete this line.

console.log(`Learn more here: ${chalk.yellow('http://bit.ly/2mwWSwH')}`);
console.log(
`Learn more here: ${chalk.yellow('https://bit.ly/CRA-advanced-config')}`
);
console.log();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty content

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing! I had delete this line.

if (isFilter !== this.state.isFilter) {
return true;
}
// if (isFilter !== this.state.isFilter) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why annotate these lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// will add it later. [graph is not render when add this component]
So... will delete this notes. will support this function after that.

if (whichGraph !== beforeGraph) {
return true;
}
// const { whichGraph } = nextProps;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these lines are not useful, could remove them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

// render the table
if (updateList) {
updateList(); // FIXME
}
} else {
message.error('fail to cancel the job');
alert('fail to cancel the job');
// message.error('fail to cancel the job');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function will use in [kill a trial],
I 'll update this function in next commit in PR.
Thanks for reviewing.

@@ -0,0 +1,21 @@
MIT License
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so...

import App from './App';

it('renders without crashing', () => {
const div = document.createElement('div');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep indentation consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

// render the table
if (updateList) {
updateList(); // FIXME
}
} else {
message.error('fail to cancel the job');
alert('fail to cancel the job');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe using browser alert API is a bad practice.
We should port to a better notification framework later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你说的对!下一版会fix

});
};

private _copyAndSort<T>(items: T[], columnKey: string, isSortedDescending?: boolean): T[] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does TS/React recommend variable name starting with underscore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fabric-react's demos show that,
but,
将会改成驼峰命名!

@@ -19,24 +19,105 @@ interface ProgressProps {

interface ProgressState {
isShowLogDrawer: boolean;
isCalloutVisible?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when experiment status is error, hover to the status, will tooltip a modal.
isCalloutVisible decide the modal's hidden | show

editTrialConcurrency = async (userInput: string): Promise<void> => {
if (!userInput.match(/^[1-9]\d*$/)) {
message.error('Please enter a positive integer!', 2);
this.getMessageInfo('Please enter a positive integer!', 'error');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "get message info" is misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, will change to showMessageInfo
It's OK?

@chicm-ms chicm-ms merged commit c718794 into microsoft:master Feb 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants