Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E9FDD200D0B for ; Wed, 27 Sep 2017 22:59:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E86671609CA; Wed, 27 Sep 2017 20:59:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 124601609C1 for ; Wed, 27 Sep 2017 22:59:28 +0200 (CEST) Received: (qmail 77746 invoked by uid 500); 27 Sep 2017 20:59:28 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 77723 invoked by uid 99); 27 Sep 2017 20:59:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Sep 2017 20:59:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 87D53180C28; Wed, 27 Sep 2017 20:59:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.451 X-Spam-Level: **** X-Spam-Status: No, score=4.451 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, NML_ADSP_CUSTOM_MED=1.2, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 478NOHGWo7zz; Wed, 27 Sep 2017 20:59:25 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 10E265FB4E; Wed, 27 Sep 2017 20:59:25 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6C162E0373; Wed, 27 Sep 2017 20:59:24 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 8050BC41700; Wed, 27 Sep 2017 20:59:22 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4129439540033882580==" MIME-Version: 1.0 Subject: Re: Review Request 62607: Replace Preact and custom testing with React + Enzyme From: Santhosh Kumar Shanmugham To: Santhosh Kumar Shanmugham , Kai Huang Cc: David McLaughlin , Aurora Date: Wed, 27 Sep 2017 20:59:21 -0000 Message-ID: <20170927205921.32396.34327@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Santhosh Kumar Shanmugham X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/62607/ X-Sender: Santhosh Kumar Shanmugham X-ReviewBoard-ShipIt: 1 References: <20170927175108.32359.25398@reviews-vm2.apache.org> In-Reply-To: <20170927175108.32359.25398@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: ui/test-setup.js X-ReviewBoard-Diff-For: ui/src/main/js/utils/ShallowRender.js X-ReviewBoard-Diff-For: ui/src/main/js/components/__tests__/Pagination-test.js X-ReviewBoard-Diff-For: ui/karma.conf.js X-ReviewBoard-Diff-For: ui/src/main/js/components/Pagination.js X-ReviewBoard-Diff-For: ui/src/main/js/utils/__tests__/ShallowRender-test.js X-ReviewBoard-Diff-For: ui/src/__mocks__/react.js Reply-To: Santhosh Kumar Shanmugham X-ReviewRequest-Repository: aurora archived-at: Wed, 27 Sep 2017 20:59:30 -0000 --===============4129439540033882580== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/62607/#review186472 ----------------------------------------------------------- Ship it! LGTM. Minor comments about readability. ui/src/main/js/components/Pagination.js Lines 3 (patched) nit - `maxPages` and `numPages` are a little confusing. Can we use the terminology similar to Reactable - such as `itemsPerPage` and `pageButtonLimit` or similar? ui/src/main/js/components/Pagination.js Lines 3 (patched) nit - maxPages and numPages are a little confusing. Can we use the terminology similar to Reactable - such as itemsPerPage and pageButtonLimit or similar? ui/src/main/js/components/__tests__/Pagination-test.js Lines 155-158 (patched) The order will be «, 7, 8, 9 correct? ui/src/main/js/components/__tests__/Pagination-test.js Lines 167-173 (patched) nit - re-order? - Santhosh Kumar Shanmugham On Sept. 27, 2017, 10:51 a.m., David McLaughlin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/62607/ > ----------------------------------------------------------- > > (Updated Sept. 27, 2017, 10:51 a.m.) > > > Review request for Aurora, Kai Huang and Santhosh Kumar Shanmugham. > > > Repository: aurora > > > Description > ------- > > Replace Preact and custom testing with React + jest + Enzyme now that they are MIT licensed. > > Side-effects: > > * The Reactable library is not compatible with React 16.0 (the MIT licensed version we are forced to use) and attempts to flag this started as early as June this year. But the author seems to have abandoned the library. So I had to create my own Pagination class. I found myself repeatedly using Reactable in places where I just wanted pagination (for lists of divs) anyway, so maybe this is a good thing. > * Deleted custom (and questionable) shallow renderer. > * The download time will be reduced due to not having to download PhantomJS. > > > Diffs > ----- > > build.gradle 460500aaeab28dcfeb29ec602d057ea4bca12378 > ui/karma.conf.js d42cda7d025f8c5618039888f4fb49ff388c3af1 > ui/package.json d6802029e0aeb9f6692ec8cc065949ce17b2ca07 > ui/src/__mocks__/react.js PRE-CREATION > ui/src/main/js/components/Pagination.js PRE-CREATION > ui/src/main/js/components/RoleList.js 32595601aae06730f537d37d95be2e746f779103 > ui/src/main/js/components/__tests__/Breadcrumb-test.js 18af0fe6c360f375fb0fa1694304d821041d9e16 > ui/src/main/js/components/__tests__/Home-test.js 8e6bc09050148ea9711dbfe6f52b83c8210262be > ui/src/main/js/components/__tests__/Pagination-test.js PRE-CREATION > ui/src/main/js/pages/__tests__/Home-test.js 4f13f99ea24c0252b5f6cbb6980e0c96832d5120 > ui/src/main/js/utils/ShallowRender.js 52e8bb259264e7dd47ee97cec35553acc147e818 > ui/src/main/js/utils/__tests__/ShallowRender-test.js d5663a7c44de795a5aa0b28d4f373871ffcc3fd2 > ui/src/main/sass/components/_tables.scss 58f176cffcdae34de7c776e31b3f0342efa3024f > ui/test-setup.js PRE-CREATION > ui/webpack.config.js e7cd672df62006bd5c5b60a6ba0903e16a767d13 > > > Diff: https://reviews.apache.org/r/62607/diff/3/ > > > Testing > ------- > > $ ./gradlew ui:lint > $ ./gradlew ui:test > > I also tested the UI in my Vagrant image. > > > Thanks, > > David McLaughlin > > --===============4129439540033882580==--