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

NOISSUE - Abstract list data-structure on input form #32

Merged
merged 14 commits into from Jan 11, 2024

Conversation

SammyOina
Copy link
Contributor

@SammyOina SammyOina commented Dec 13, 2023

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Dependency Update

What does this do?

Allows input of list items in a user-friendly way without revealing the underlying datastructure

Which issue(s) does this PR fix/relate to?

None

Have you included tests for your changes?

  • Yes
  • No, and this is why: Changes are on user experience

Did you document any new/modified functionality?

  • Yes
  • No, and this is why: only minor changes to ui

Notes

image

This could also be used for metadata input

@SammyOina SammyOina marked this pull request as draft December 13, 2023 08:06
@SammyOina SammyOina marked this pull request as ready for review December 14, 2023 13:16
ui/web/template/navbar.html Show resolved Hide resolved
ui/web/template/things.html Outdated Show resolved Hide resolved
@SammyOina SammyOina marked this pull request as draft December 18, 2023 14:45
@SammyOina SammyOina marked this pull request as ready for review December 18, 2023 21:09
ui/web/static/js/listUtils.js Outdated Show resolved Hide resolved
ui/web/static/js/listUtils.js Outdated Show resolved Hide resolved
ui/web/template/bootstraps.html Outdated Show resolved Hide resolved
@ianmuchyri
Copy link
Contributor

It shouldn't reflect if a user presses the enter button without having any data as shown below
image

Those dots are if I press the enter button without having any tags

@ianmuchyri
Copy link
Contributor

for some reason now, I can't delete the tags by clicking on them

ui/web/template/users.html Outdated Show resolved Hide resolved
ui/web/template/things.html Outdated Show resolved Hide resolved
ui/web/static/js/listUtils.js Outdated Show resolved Hide resolved
@ianmuchyri
Copy link
Contributor

There is no more color
image

@ianmuchyri
Copy link
Contributor

also check why in this modal, it does not work as intended. I cannot see the tags at the top
image

Copy link
Contributor

@ianmuchyri ianmuchyri left a comment

Choose a reason for hiding this comment

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

LGTM

@dborovcanin
Copy link
Contributor

Please rebase.

SammyOina and others added 14 commits January 10, 2024 13:25
Signed-off-by: SammyOina <sammyoina@gmail.com>
…s to a list using the Enter key.

Signed-off-by: SammyOina <sammyoina@gmail.com>
The package-lock.json file had an incorrect version of prettier. This commit fixes the version to "^3.1.0" to ensure compatibility with the project dependencies.

Signed-off-by: SammyOina <sammyoina@gmail.com>
The commit fixes a styling issue in the listUtils.js file by adding a margin-bottom class to the newly created list item. This ensures proper spacing between list items.

In addition, the commit also addresses a styling issue in the domains.html file. The commit modifies the class attribute of a div element to ensure proper alignment within a row.

These changes improve the overall visual consistency and user experience.

Signed-off-by: SammyOina <sammyoina@gmail.com>
The deleteItem function in listUtils.js was not working properly due to unnecessary code. Removed the unnecessary code and fixed the bug.

Also, removed an extra line in bootstraps.html.

This commit addresses the above issues.

Signed-off-by: SammyOina <sammyoina@gmail.com>
The commit fixes a bug in the listUtils.js file where an empty input value was being added as a list item. The bug is fixed by adding a condition to check if the input value is not empty before creating a new list item.

Signed-off-by: SammyOina <sammyoina@gmail.com>
The deleteItem function in listUtils.js was not correctly checking for the class name "highlight-list-item" when deleting an item. This has been fixed by using the classList.contains method instead of comparing the className directly.

Signed-off-by: SammyOina <sammyoina@gmail.com>
Co-authored-by: Ian Ngethe Muchiri <100555904+ianmuchyri@users.noreply.github.com>
Co-authored-by: Ian Ngethe Muchiri <100555904+ianmuchyri@users.noreply.github.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
The button class in listUtils.js was updated to "btn btn-primary" to match the styling of other buttons. In navbar.html, an id attribute was added to the "domain-tags" input element.

Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
The commit fixes the class name of the button in listUtils.js.
The previous class name "btn-primary" has been changed to "body-button".
This ensures consistency with the rest of the codebase and improves readability.

Signed-off-by: SammyOina <sammyoina@gmail.com>
Standardize and clarify tag-related variable names in HTML templates for things and users. Renamed 'tags' to 'thingsTags' and 'userTags' to mitigate ambiguity across different features where tag systems are utilized. These changes improve code readability and maintain a consistent naming convention.

Signed-off-by: SammyOina <sammyoina@gmail.com>
@SammyOina
Copy link
Contributor Author

Please rebase.

@dborovcanin I have rebased

1 similar comment
@SammyOina
Copy link
Contributor Author

Please rebase.

@dborovcanin I have rebased

Copy link
Member

@rodneyosodo rodneyosodo left a comment

Choose a reason for hiding this comment

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

Let's do it also when updating tags

image

@SammyOina
Copy link
Contributor Author

Let's do it also when updating tags

image

Updates use tables it's a bit different and would require a separate PR

@rodneyosodo
Copy link
Member

Let's do it also when updating tags

Updates use tables it's a bit different and would require a separate PR

Can you create an issue for that

@dborovcanin dborovcanin merged commit 229b937 into absmach:main Jan 11, 2024
2 checks passed
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.

None yet

4 participants