-
Notifications
You must be signed in to change notification settings - Fork 52
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
Features Icons in features panel #284
base: develop
Are you sure you want to change the base?
Features Icons in features panel #284
Conversation
…nto style/grid
…nto style/grid
…tests according to the new objects, Changing front to get information from Day objects, Re-arranging calendar.html grid stracture to be render by weeks, adding js functionality for day view section, adding css effects on daily event display
…eek object, changing tests
…into feature/feature-panel
…into feature/feature-panel
…i/calendar into feature/feature-icon
…into feature/feature-panel
…i/calendar into feature/feature-icon
…into feature/feature-panel
…i/calendar into feature/feature-icon
…into feature/feature-icon
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.
Where are all the tests? :)
Tests are included and modified in the |
…into feature/feature-icon
…into feature/feature-icon
…into feature/feature-icon
if (!infoBox.classList.contains('info-box')) { | ||
infoBox.classList.add('info-box'); | ||
} else { | ||
infoBox.classList.remove('info-box'); | ||
} |
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.
classList.toggle
@@ -116,7 +126,7 @@ async def is_access_allowd(request: Request, route: str) -> bool: | |||
& (UserFeature.user_id == user.user_id), | |||
), | |||
).scalar() | |||
|
|||
print(user_feature) |
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.
Remove
content='No additional settings for this one :)') | ||
|
||
template = templates.get_template( | ||
"partials/features_panels/" + template + '.html' |
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.
Use fstrings & precommit hooks
@@ -384,6 +404,8 @@ main { | |||
color: var(--primary); | |||
} | |||
|
|||
.text-red {color: var(--negative)} |
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.
Use prettify
if (elementsArray.includes(row)) { | ||
return row.classList.remove("invisible"); | ||
} else { | ||
return row.classList.add("invisible"); | ||
} |
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.
Use classList.toggle
function searchFeature(searchValue, elements) { | ||
const elementsArray = Array.from(elements); | ||
const result = elementsArray.filter(element => { | ||
return element.getElementsByClassName("row-feature-name")[0].innerHTML.toLowerCase().includes(searchValue); |
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.
- Prefer innerText
- Split to lines
'input', function (evt) { | ||
const rows = document.getElementsByClassName("feature-row"); | ||
const value = evt.target.value.trim().toLowerCase(); | ||
if (!value) { | ||
Array.from(rows).map(element => element.classList.remove("invisible")); | ||
} else { | ||
const result = searchFeature(value, rows); | ||
displayResult(rows, result); | ||
} | ||
}); |
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.
Export the function to external function
if (action === "ADD") { | ||
return new URL('/features/add', url); | ||
} | ||
return new URL('/features/delete', url); |
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.
Move all the strings here to be constants
|
||
function appandFeatures(){ | ||
const baseURL = window.location.origin; | ||
const route = new URL('/features/installed', baseURL); |
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.
String should be a const
@@ -1,8 +1,9 @@ | |||
import pytest |
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 add tests to achieve 100% coverage for this feature.
Icons for Features in Feature Panel.
The icons provided by Ionicons.
With every change to Feature Panel branch this branch will update as well.
Please comment on icons related things only.
if you want to comment on features panel related things there is a PR for that.
Thank you all!
FRONT (by @aviadamar):
This panel allows you to view optional add-ons. Add, remove or customize features to your liking by clicking on the features icon in the navigation bar.