devabhishekpal commented on code in PR #7017:
URL: https://github.com/apache/ozone/pull/7017#discussion_r1703838917


##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/overviewCard/overviewTableCard.tsx:
##########
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import React from 'react';
+import { Card, Row, Table } from 'antd';
+
+import { ColumnType } from 'antd/es/table';
+import { Link } from 'react-router-dom';
+
+// ------------- Types -------------- //
+
+type TableData = {
+  key: React.Key;
+  name: string;
+  value: string;
+  action?: React.ReactElement | string;
+}
+
+type OverviewTableCardProps = {
+  title: string;
+  columns: ColumnType<TableData>[];
+  tableData: TableData[];
+  hoverable?: boolean;
+  loading?: boolean;
+  data?: string | React.ReactElement;
+  linkToUrl?: string;
+  showHeader?: boolean;
+}
+

Review Comment:
   So in this scenario actually since both the cases are in JSX, it will take 
equivalent time to render the CSS as it needs to parse the JSX to CSS.
   
   As for going inline vs external stylesheet there is a good article:
   https://simonadcock.com/are-inline-styles-faster-than-atomic-css/
   
   In this they tried making 100 elements and applied inline vs external 
stylesheet.
   They found inline style is taking ~39ms vs external style is taking ~30ms to 
render which is a 9ms improvement.
   So on the larger scale it doesn't matter much unless it is a very complex 
UI. But even then React does it's own optimizations.



##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/overviewCard/overviewTableCard.tsx:
##########
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import React from 'react';
+import { Card, Row, Table } from 'antd';
+
+import { ColumnType } from 'antd/es/table';
+import { Link } from 'react-router-dom';
+
+// ------------- Types -------------- //
+
+type TableData = {
+  key: React.Key;
+  name: string;
+  value: string;
+  action?: React.ReactElement | string;
+}
+
+type OverviewTableCardProps = {
+  title: string;
+  columns: ColumnType<TableData>[];
+  tableData: TableData[];
+  hoverable?: boolean;
+  loading?: boolean;
+  data?: string | React.ReactElement;
+  linkToUrl?: string;
+  showHeader?: boolean;
+}
+

Review Comment:
   Addressed this in the commit 
[8c54c99](https://github.com/apache/ozone/pull/7017/commits/8c54c99a2590b11867a6b7b4e7743fb8408360e6)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to