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
separate legacyShareStyle from isLegacyShare #22615
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,11 +106,7 @@ let WireframeButtons = React.createClass({ | |
}, | ||
|
||
renderNewProjectButton: function () { | ||
// Unfortunately, isLegacyShare currently has the wrong value (is true for non-legacy artist | ||
// and playlab). So instead, we check the first letter (after the /) in the path name of the | ||
// url, as legacy shares all start with /c | ||
// var isLegacyShare = this.props.isLegacyShare; | ||
var isLegacyShare = window.location.pathname[1] === 'c'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code had noticed that something was wrong (the comment says |
||
const { isLegacyShare } = this.props; | ||
var appTypeAndLegacy = this.props.appType + (isLegacyShare ? '_legacy' : ''); | ||
var url = APP_TYPE_TO_NEW_PROJECT_URL[appTypeAndLegacy]; | ||
if (url) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,8 @@ def show | |
else | ||
# sharing | ||
level_view_options(@level_source.level_id, hide_source: true) | ||
view_options(no_header: true, no_footer: true, code_studio_logo: true) | ||
@is_legacy_share = true | ||
view_options(no_header: true, no_footer: true, code_studio_logo: true, is_legacy_share: true) | ||
@legacy_share_style = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this controller, we set both |
||
end | ||
|
||
respond_to do |format| | ||
|
@@ -38,8 +38,8 @@ def show | |
def edit | ||
authorize! :read, @level_source | ||
level_view_options(@level_source.level_id, hide_source: false) | ||
view_options(small_footer: true) | ||
@is_legacy_share = true | ||
view_options(small_footer: true, is_legacy_share: true) | ||
@legacy_share_style = true | ||
# currently edit is the same as show... | ||
render "show" | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,7 +300,7 @@ def show | |
# for sharing pages, the app will display the footer inside the playspace instead | ||
no_footer = sharing | ||
# if the game doesn't own the sharing footer, treat it as a legacy share | ||
@is_legacy_share = sharing && !@game.owns_footer_for_share? | ||
@legacy_share_style = sharing && !@game.owns_footer_for_share? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the projects controller, we only ever set |
||
view_options( | ||
readonly_workspace: sharing || readonly, | ||
full_width: true, | ||
|
@@ -309,7 +309,6 @@ def show | |
no_footer: no_footer, | ||
code_studio_logo: sharing && !iframe_embed, | ||
no_header: sharing, | ||
is_legacy_share: @is_legacy_share, | ||
small_footer: !no_footer && (@game.uses_small_footer? || @level.enable_scrolling?), | ||
has_i18n: @game.has_i18n?, | ||
game_display_name: data_t("game.name", @game.name) | ||
|
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.
This is the only one I'm not certain on. Are we trying to determine if we're a
/c
share URL here? We're outside of thethis.isProjectLevel()
check. One reason to chooselegacyShareStyle
is that it istrue
in all of the places where we previously had setisLegacyShare
totrue
- so I'm not changing any behavior.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.
The comment on
showMinimalProjectHeader()
reads// Minimal project header for viewing channel shares and legacy /c/ share pages.
which I think means you've got it right - we want the minimal header in both cases.