Skip to content
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

Forms and Layouts (#998) #1157

Draft
wants to merge 70 commits into
base: trunk
Choose a base branch
from
Draft

Forms and Layouts (#998) #1157

wants to merge 70 commits into from

Conversation

kyberorg
Copy link
Owner

@kyberorg kyberorg commented Feb 13, 2023

Fix #998

Aleksandr Muravja added 30 commits January 11, 2023 12:51
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Aleksandr Muravja added 14 commits January 31, 2023 17:47
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
@kyberorg kyberorg self-assigned this Feb 13, 2023
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Copy link
Owner Author

@kyberorg kyberorg left a comment

Choose a reason for hiding this comment

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

  • Telegram span should fit window at phone (only at profile page).

  • Password generator should fit window at phone (at least buttons should be at next line). All pages affected.

  • Axe1@Dev dark mode sync issue. Axe2 user works.

  • Session duration/landing page updated notification should be success notification.

  • Profile tab (maybe focus on email if it is empty).

  • Profile tab on edit email (email empty). Save button does nothing and no way to - return back to edit button. Same on every email (valid or not).

  • Information notification should be visible at least for 3-4 seconds.

  • Confirm account page: validate email and show "not implemented yet" notification.

  • Hide section if account is confirmed.

  • Maybe reuse telegram token as well (this prevents "token already expired" message).

  • Profile tab: show tooltip with status (pending, validated, failed) for email. Same for validation page. Maybe extend email field with ValidationStatus enum.

align-self: center;
}

.toggle-with-prefix-postfix {
Copy link
Owner Author

Choose a reason for hiding this comment

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

Toggle with prefix and postfix

/**
* Method, that should be called at initialization phase.
*
* @param user bound {@link User}. Usually stored within current session.
Copy link
Owner Author

Choose a reason for hiding this comment

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

Current AxeSession

* {@link OperationResult#generalFail()} with {@link #ERR_NO_EMAIL_ACCOUNT} message,
* when {@link User} has no {@link AccountType#EMAIL} {@link Account}.
*/
public OperationResult updateEmailAccount(final User user, final String email) {
Copy link
Owner Author

Choose a reason for hiding this comment

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

Do nothing/return OpResult with Noop message, when account type is not email.

*/
public void rollbackAccount(final Account oldAccount) {
if (oldAccount == null) throw new IllegalArgumentException("old account cannot be null");
Optional<Account> currentAccount = this.getAccount(oldAccount.getUser(), oldAccount.getType());
Copy link
Owner Author

Choose a reason for hiding this comment

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

Not clear why current account got using old account data.

if (currentAccount.isPresent()) {
currentAccount.get().copy(oldAccount);
} else {
accountDao.save(oldAccount);
Copy link
Owner Author

Choose a reason for hiding this comment

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

Why do we need current account? Let's save current account instead

tokenDao.existsByTokenTypeAndUser(TokenType.ACCOUNT_CONFIRMATION_TOKEN, user);
if (userAlreadyHasConfirmationToken) {
return OperationResult.banned().withMessage(ERR_USER_ALREADY_HAS_TOKEN);
Optional<Token> optionalToken =
Copy link
Owner Author

Choose a reason for hiding this comment

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

Optional token -> existing token

log.warn("{} Unable to send created {} to {}. OpResult: {}",
TAG, confirmationToken.getTokenType(), input.getEmail(), sendResult);
log.warn("{} Requesting Rollback", TAG);
Optional<Token> confirmationToken = createConfirmationToken(userAccount);
Copy link
Owner Author

Choose a reason for hiding this comment

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

Do we really need own method here?

if (currentAccount.isPresent()) {
currentAccount.get().copy(oldAccount);
} else {
accountDao.save(oldAccount);
Copy link
Owner Author

Choose a reason for hiding this comment

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

Use update method instead

Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Signed-off-by: Aleksandr Muravja <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forms and Layouts
1 participant