-
Notifications
You must be signed in to change notification settings - Fork 97
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
Create UI for clearing cache #84
base: develop
Are you sure you want to change the base?
Conversation
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.
Congrats for starting to learn ember and on your first PR in ember 🥳
Requesting changes:
Need to include Ember Test Selectors
Need to remove the hardcoding in template
Also some CSS related minor stuff
Thank you! 😄
app/styles/self-clear-cache.css
Outdated
color:#041187; | ||
font-family: Helvetica Neue; | ||
font-weight: bold; | ||
font-size: 36px |
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 refer this review comment for font-size
: #78 (comment)
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.
Okay sure! 👍
app/styles/self-clear-cache.css
Outdated
|
||
|
||
.button { | ||
top: 335px; |
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.
Can we use something like % here?
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.
Sure!
app/styles/self-clear-cache.css
Outdated
background-color: white; | ||
font-family: Helvetica Neue; | ||
font-weight:bold; | ||
font-size: 18px; |
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.
re: font-size
app/styles/self-clear-cache.css
Outdated
background-color: transparent; | ||
border: 2px solid #FF8C00; | ||
color: #FF8C00; | ||
background-color: white; |
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.
background-color
is repeating
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.
Thanks for pointing it out! 😃
app/styles/self-clear-cache.css
Outdated
color:#041187; | ||
font-family: Helvetica Neue; | ||
font-weight: bold; | ||
font-size: 24px |
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.
re: font-size
app/templates/index.hbs
Outdated
<SelfClearCache @time="23 March 1:23 pm IST" @totalTimes="1"/> |
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.
Once we have the API ready:
- We would be calling that API from
routes
file - Pass that response in
model
- Get the data from
model
in controller (for this template) - Mark it as
@tracked
(state variable) - Then finally use that tracked variable here (in template) as props.
If this sounds confusing, please read that again and refer this PR to get an idea of what I'm trying to say: https://github.com/Real-Dev-Squad/website-my/pull/82/files
I know we don't have the API yet, so we could create a mock object in controller file and get that mock data from controller to template, so we can remove the hardcoding and our way to integrating API (when it's ready) will become easier, less work to do then.
Let me know if there are any doubts 🙂
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.
Thanks for the review and the explanation! It will surely help a lot. 💯
app/styles/self-clear-cache.css
Outdated
|
||
} |
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.
Unnecessary empty line before every closing bracket
app/components/self-clear-cache.hbs
Outdated
<div class="self-clear-cache-container"> | ||
<div class="last-request"> | ||
Last Request: {{@time}} | ||
</div> | ||
<div class="clear-cache-button"> | ||
<button class="button" type="submit" disableb={{false}}>Clear cache</button> | ||
</div> | ||
<div class="remaining-requests"> | ||
{{@totalTimes}} / 3 requests remaining for today | ||
</div> | ||
</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.
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.
Okay! I will make the changes.
app/styles/self-clear-cache.css
Outdated
} | ||
|
||
.button { | ||
top: 335%; |
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.
335%?! 😱
app/components/self-clear-cache.hbs
Outdated
Last Request: {{@time}} | ||
</div> | ||
<div class="clear-cache-button"> | ||
<button class="button" type="submit" disableb={{false}}>Clear cache</button> |
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.
typo: disabled
app/components/self-clear-cache.hbs
Outdated
@@ -0,0 +1,11 @@ | |||
<div class="self-clear-cache-container"> |
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.
NIT: Can we please follow BEM rule for class naming?
…into feat/UI-cache-page
Create UI for clearing cache on index page. Fixes #66