-
Notifications
You must be signed in to change notification settings - Fork 39
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
Cais gateway UI changes #1614
Cais gateway UI changes #1614
Conversation
WalkthroughThe pull request introduces significant changes to the wallet extension's user interface, improving the visual presentation and user experience. It includes modifications to the HTML structure, CSS styles, and JavaScript functionality. New elements and styles are added, and existing functions are updated for better error handling and status messaging. Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 5
Files ignored due to filter (1)
- tools/walletextension/api/staticOG/obscuro.svg
Files selected for processing (3)
- tools/walletextension/api/staticOG/index.html (2 hunks)
- tools/walletextension/api/staticOG/javascript.js (5 hunks)
- tools/walletextension/api/staticOG/style.css (3 hunks)
Additional comments (Suppressed): 12
tools/walletextension/api/staticOG/style.css (7)
1-182: The new CSS rules significantly change the look and feel of the page. The body's background color has been changed to a gradient, and the font color, size, and weight have been adjusted. New classes have been added for a logo, a login form (
.begin-box
), and a button with a hover effect. The anchor tag's color has been kept the same. Ensure that these changes align with the overall design language of the application and that they provide a good user experience across different screen sizes and devices.206-213: The
display
property of thetable
has been set tonone
, which means the table will not be visible by default. If this is intentional and the visibility of the table is controlled dynamically using JavaScript, then this is fine. Otherwise, this could be an issue. Thebackground-color
of the table has been changed from#333
to#000000
, and amargin-top
of20px
has been added.219-221: The
background-color
of theth
element remains unchanged.223-236: New styles have been added for
h2
,#join
, and#versionDisplay
. Ensure that these changes are reflected correctly in the HTML structure.238-240: The
color
of the#status
element has been set tored
. This is typically used to indicate errors or warnings, so ensure that this is the intended use case.242-245: The
#revokeUserID
element has been given amargin-top
of10px
and apadding
of10px
.247-315: A new class
.spinner
has been added for a spinner animation. This is typically used to indicate that a process is running in the background. Ensure that this animation is used appropriately in the JavaScript code.tools/walletextension/api/staticOG/javascript.js (5)
5-14: The new constants
idInformation
,idInformation2
,idBegin
, andidSpinner
have been added. Ensure that these IDs are correctly defined in the HTML structure and are used appropriately throughout the JavaScript code.275-298: The new elements
informationArea
,informationArea2
,beginBox
, andspinner
are fetched from the DOM and used in thedisplayOnlyJoin
function. Ensure that these elements are correctly manipulated to reflect the desired UI state.324-334: The error message in line 333 has been updated. Make sure this new message is more informative and user-friendly than the previous one.
368-379: The visibility of
beginBox
andspinner
is manipulated before and after the loop in lines 373-377. This seems to be a way to show a loading state while the accounts are being authenticated. Ensure that this provides a better user experience and doesn't introduce any UI glitches.397-402: The visibility of
beginBox
andspinner
is manipulated before and after therevokeUserID
function call. This seems to be a way to show a loading state while the user ID is being revoked. Ensure that this provides a better user experience and doesn't introduce any UI glitches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 4
Files selected for processing (1)
- tools/walletextension/api/staticOG/index.html (2 hunks)
Additional comments (Suppressed): 3
tools/walletextension/api/staticOG/index.html (3)
18-18: The spinner div is empty. If it's meant to display a loading spinner, ensure that it's being populated dynamically via JavaScript or CSS animations.
21-35: The instructions provided are clear and detailed, which should help users understand the process. However, consider breaking this large block of text into smaller sections or using collapsible elements for better readability.
47-57: The table structure is well defined and clear. The IDs and classes are appropriately named, which should make it easier to manipulate this table in JavaScript.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert back the Hard coded gateway address & any usage of it.
Line 1, 14-18, Line 34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvements!
Mentioned a few things in the comments, but nothing major (not working after refresh is the biggest issue in my opinion).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Files selected for processing (3)
- tools/walletextension/api/staticOG/index.html (1 hunks)
- tools/walletextension/api/staticOG/javascript.js (8 hunks)
- tools/walletextension/api/staticOG/style.css (2 hunks)
Additional comments (Suppressed): 16
tools/walletextension/api/staticOG/style.css (2)
1-184: The new CSS rules for the HTML and body elements, as well as the new classes and IDs, significantly change the visual appearance of the page. The changes include a new gradient background, font properties, and a new layout for the login form. The
.begin-box
class, which is likely used for the login form, has been set tovisibility: hidden;
by default. This suggests that the form will be displayed programmatically, possibly in response to a user action. The.begin-box .user-box input:focus ~ label
and.begin-box .user-box input:valid ~ label
rules change the position and color of the label when the input field is focused or contains valid input, providing visual feedback to the user. The.begin-box a:hover
rule adds a hover effect to the links in the form. The.begin-box a span
rules and keyframes add an animation to the links. Ensure that these changes provide a good user experience and are compatible with all targeted browsers.205-319: The new CSS rules for the table element and its children change the appearance and behavior of the table. The table is now hidden by default (
display: none;
), suggesting that it will be displayed programmatically, possibly in response to a user action. The width of the table has been set to 100%, which will make it span the entire width of its parent element. The background color of the table and the table headers has been changed. The#join
ID,#versionDisplay
ID,#status
ID, and#revokeUserID
ID have new styles that change their position, size, color, and visibility. The.spinner
class and its pseudo-elements add a spinner animation, which is likely used to indicate loading or processing. Ensure that these changes provide a good user experience and are compatible with all targeted browsers.tools/walletextension/api/staticOG/javascript.js (6)
8-14: The new constants
idInformation
,idInformation2
,idBegin
, andidSpinner
have been added. Ensure that these IDs correspond to the correct HTML elements in the UI. Also, ensure that these elements are used appropriately in the code.66-71: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [58-71]
No significant changes have been made in these lines. The functions
getNetworkName
andgetRPCFromUrl
remain the same.
273-306: The new variables
informationArea
,informationArea2
,beginBox
, andspinner
have been introduced and are used in thedisplayOnlyJoin
anddisplayConnectedAndJoinedSuccessfully
functions. These changes seem to be related to the UI overhaul mentioned in the PR summary. Ensure that these changes align with the intended UI design and user experience.324-334: The error message in line 331 has been updated. Ensure that this new message is more clear and helpful to the user.
366-378: The visibility of
beginBox
andspinner
is being toggled before and after the loop in lines 369-370 and 376-377. This seems to be a loading indicator for the user. Ensure that this provides a better user experience and doesn't cause any unexpected behavior or layout shifts in the UI.393-400: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [395-410]
Similar to the previous comment, the visibility of
beginBox
andspinner
is being toggled in therevokeUserIDButton
event listener. Again, ensure that this provides a better user experience and doesn't cause any unexpected behavior or layout shifts in the UI.tools/walletextension/api/staticOG/index.html (8)
4-6: The title and favicon have been updated. Ensure that the new favicon file
favicon-32x32.png
exists at the specified path and that the new title is appropriate for the page.15-16: A new logo has been added to the page. Ensure that the logo file
obscuro.svg
exists at the specified path and is displayed correctly.18-18: A new spinner element has been added. Ensure that the spinner is displayed and hidden correctly in the JavaScript code.
20-61: A new div with the id
begin-box
has been added, containing a form with instructions, a join button, an accounts table, a revoke button, and a status paragraph. Ensure that the form behaves as expected and that the instructions are clear and accurate.40-46: The join button has been redesigned with additional span elements. Ensure that the button's appearance and functionality are as expected.
47-57: The accounts table has been redesigned with new column headers. Ensure that the table displays the correct data and that the column headers are appropriate.
58-58: The revoke button has been moved inside the form. Ensure that the button's functionality is not affected by this change.
63-63: The version display div has been moved outside the form. Ensure that the version display is still visible and positioned correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Files selected for processing (1)
- tools/walletextension/api/staticOG/index.html (1 hunks)
Additional comments (Suppressed): 7
tools/walletextension/api/staticOG/index.html (7)
4-6: The title tag and favicon link have been updated. Ensure that the new favicon file
favicon-32x32.png
exists in the same directory as the HTML file.9-9: The
type="module"
attribute has been added to the script tag forjavascript.js
. This means that the script is treated as an ECMAScript module. As a result, the script is loaded in strict mode and variables are scoped to the module rather than the global scope. Ensure thatjavascript.js
is compatible with this change.14-16: A new div with class
container-fluid
has been added, containing an image with the Obscuro logo. Ensure that the image fileobscuro.svg
exists in the same directory as the HTML file.18-18: A new div with class
spinner
and idspinner
has been added. This is likely for a loading spinner animation. Ensure that the corresponding CSS and JavaScript for this spinner are implemented correctly.20-61: A new div with class
begin-box
and idbegin-box
has been added. This div contains a form with instructions, a join button, an accounts table, a revoke accounts button, and a status paragraph. The structure and content of this form are significantly different from the previous version. Ensure that the corresponding CSS and JavaScript are updated to handle this new structure and content.58-58: The
style
attribute has been removed from therevokeUserID
button. Ensure that the corresponding CSS is updated to style this button.63-63: The
style
attribute has been removed from theversionDisplay
div. Ensure that the corresponding CSS is updated to style this div.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Revamped the UI and fixed several UI bugs. Only tested on desktop.