-
Notifications
You must be signed in to change notification settings - Fork 3
UX: show complete URL path if website domain is same as instance domain #5
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
base: url-handling-pre
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
User description
PR #6
PR Type
Enhancement
Description
Move website name logic from frontend to backend serializer
Show complete URL path when website domain matches instance domain
Display parent domain path when website is subdomain of instance
Add conditional inclusion of website_name attribute in serialization
Diagram Walkthrough
File Walkthrough
user_serializer.rb
Add backend website_name serialization with domain logicapp/serializers/user_serializer.rb
website_nameattribute to serialized user attributeswebsite_namemethod with domain comparison logicdomains
include_website_nameconditional to only include when websitepresent
user.js.es6
Remove frontend websiteName computed propertyapp/assets/javascripts/discourse/controllers/user.js.es6
websiteNamecomputed property from controlleruser.hbs
Update template to use backend website_name attributeapp/assets/javascripts/discourse/templates/user/user.hbs
websiteNamecontroller property withmodel.website_nameuser_serializer_spec.rb
Add website_name serialization tests with domain scenariosspec/serializers/user_serializer_spec.rb
user.js.es6
Fix JSDoc property documentation referenceapp/assets/javascripts/discourse/models/user.js.es6
websiteNametoprofileBackground