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

Setup wizard refactor #3548

Merged
merged 11 commits into from
Jul 3, 2017
Merged

Setup wizard refactor #3548

merged 11 commits into from
Jul 3, 2017

Conversation

pratu16x7
Copy link
Contributor

@pratu16x7 pratu16x7 commented Jun 23, 2017

With frappe/erpnext#9441

screen shot 2017-06-23 at 8 20 31 am

  • Fetch country based on IP address:
    screen shot 2017-06-23 at 8 20 53 am

  • Fetch user detail from redis cache stored at the time of signup, then fetch gravatar from email
  • New Attach Image and password controls
    screen shot 2017-06-23 at 8 35 42 am

  • Disable next button until mandatory fields filled:
    disable next

  • Add more records:
    add_more_setup_wiz

  • UI tests (following screenshot for erpnext test):
    screen shot 2017-06-23 at 8 24 57 am

  • Moved sample data to last slide, but we can remove it altogether, and include bootstrapped stuff by default … maybe let them know about it in a later message.
    screen shot 2017-06-23 at 8 48 39 am

  • Breaking up a PR will have to be thought of from the beginning. Unfortunately, work on this had already begun :( Insights on this will be helpful.

@frappe-pr-bot
Copy link
Collaborator

Pull Request Summary

Image or animted GIF Not Added

Please add an image or animated GIF as proof that you have manually tested this contribution. Hint: use LiceCAP to capture animated GIFs.

Test Case Not Added / Updated

Since you have changed a Python file, you must update the relevant python test case. If there is no test coverage for this code, then please add it.

Large Patch

This is a very large pull request, unless there is a very good reason, please try and break it down to smaller changes. Read this strategy on how it can be done


Result

  • Failed: User testing is mandatory for patches with changes in JS code.
  • Failed: Updating test cases is mandatory for large pull requests
  • Failed: User testing with animated GIF is mandatory for large pull requests.

This summary was automatically generated based on this script


.setup-wizard-slide .img-overlay {
display: flex;
align-items: center;
Copy link
Member

Choose a reason for hiding this comment

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

mixed tabs and spaces

Copy link
Member

@rmehta rmehta left a comment

Choose a reason for hiding this comment

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

minor fixes, remove freegeoip. otherwise looks fine 👍

}

@frappe.whitelist()
def load_country():
import requests
Copy link
Member

Choose a reason for hiding this comment

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

Remove this. We should not rely on 3rd party services as they are likely to have rate limits. And if users are on a VM, this is not accessible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Found frappe.sessions.get_geo_ip_country for this


@frappe.whitelist()
def load_user_details():
return {
Copy link
Member

Choose a reason for hiding this comment

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

What if cache is not built?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will stay undefined, right? So no autofilling

$("body").css({"padding-top":"30px"});

$('header').append(`<div class="setup-wizard-brand"">
<img src="/assets/frappe_theme/img/erp-icon.svg" class="brand-icon"
Copy link
Contributor

Choose a reason for hiding this comment

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

@pratu16x7,

dependency on frappe_theme app !!

Also, ERPNext logo should not be included in frappe app, may be we can extend the icon if erpnext app is not installed then show only frappe icon

],
help: __('The first user will become the System Manager (you can change this later).'),
onload: function(slide) {
if(user!=="Administrator") {
Copy link
Contributor

Choose a reason for hiding this comment

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

user is deprecated use frappe.session.user

@mbauskar
Copy link
Contributor

@pratu16x7,

Please push the changes and reopen the PR

@mbauskar mbauskar closed this Jun 23, 2017
@pratu16x7 pratu16x7 reopened this Jun 28, 2017
@pratu16x7
Copy link
Contributor Author

pratu16x7 commented Jun 28, 2017

Frappe header image:
screen shot 2017-06-28 at 9 47 57 am

@frappe.whitelist()
def load_country():
from frappe.sessions import get_geo_ip_country
return get_geo_ip_country(frappe.local.request_ip) if frappe.local.request_ip else None
Copy link
Member

Choose a reason for hiding this comment

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

do we load geoip database by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like it

screen shot 2017-06-28 at 2 53 04 pm

@mbauskar mbauskar modified the milestone: 2017-07-05 Jun 30, 2017
@mbauskar mbauskar merged commit afed0c9 into frappe:develop Jul 3, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants