mcgilman opened a new pull request, #8053: URL: https://github.com/apache/nifi/pull/8053
This PR begins the process of re-implementing the UI using updated dependencies as described in the JIRA [1]. In doing so, it moves the UI away from markup generated on the server and allows for a better developer experience when building new capabilities. It is not intended to provide a drastically new experience for the user. The concepts and capabilities presented to the user are unchanged and the flow throughout the application is no different. With this PR in place however, we will be in a better position to make these sorts of changes in the future. In its current state it is not ready to replace the existing UI as there are a number of features that are not implemented yet. Additionally, the efforts thus far have not prioritized the look and feel of various forms throughout the application and have instead focused on simple functionality. The PR is being posted now due to an interest in collaboration with others in the community. Rather than trying to manage everything in a feature branch and keeping it up to date with current main, the new UI is being introduced alongside the current UI and behind a Maven profile which is not active by default. The new UI will not be available with the default build. However, if the build activates the `include-new-ui` profile the new UI will be built and included. On startup, NiFi has been updated to locate the new UI and if present deploy it to a new context path (`/nf`). If the new UI is not found, nothing is deployed to the new context path and the application functions as it does today. One thing to note, when using the new UI running in NiFi at `/nf`, the user can log in and use the application. When logging out however, there is a hardcoded redirect that happens from the back end which sends the user to the old UI (`/nifi`). Once the remaining features have been implemented, the look and feel has be polished, and it is ready for release a new PR will be posted that removes the old UI, updates the context path, and removes the Maven profile. At that point, the logout redirection issue called out above won’t be a problem anymore. I will create follow on JIRAs for all of these efforts. Developers can also run the new UI using `ng serve`. When accessing the UI in this manner, the login form does not work. There is some server side login request handling that does not work through the development server. Fortunately, an authenticated user does not need to log in. So to work around this, simply log in to NiFi using either UI running in the application first. The authentication token will be available in a cookie that is also available in the UI hosted by the development server. I’ve tried to structure the application in the following manner. ![Screen Shot 2023-11-15 at 8 59 48 AM](https://github.com/apache/nifi/assets/123395/6e9f719f-cbe2-481d-be91-31fff50fcb0b) Each page has its own directory inside `pages`. Within each page, the primary content is in `feature`, any services for that page are in `service`, state management for the feature is in `state`, and any ui components referenced by the feature are in `ui`. The app root also contains `state`, `service`, and `ui` which are available for use by anything in any page. Pages, however, should not access anything from any other pages. I thought this directory structure would be sufficient but as new features are continually introduced with their own actions and state I suspect we may need further organization and refactoring. The application leverages ngrx state management throughout. This includes actions and selectors for all data flow. One approach that may be considered unique is that all dialogs and routing happen as side effects to actions dispatched by components. This leaves components less cluttered and can focus on its purpose and not needing to deal with activated routes, dialog references, etc. It should make the components more testable as they only need to be provided with some data and then verify expected actions are dispatched. All specs at this point are bootstrapped with a mock store and selectors as needed to create successfully. More meaningful tests will be introduced as we continue working through the remaining items and finalize the UX. As noted in the JIRA [1], even once the new canvas UI is in place there will still be other UIs in NiFi that will need updating. These include documentation, Custom UIs, Content Viewers, and error handling. These will continue to be used within the new canvas UI until they can also be migrated. [1] https://issues.apache.org/jira/browse/NIFI-11481?focusedCommentId=17766450&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17766450 -- 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...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org