-
Notifications
You must be signed in to change notification settings - Fork 513
Adding embed snippet to Thimble publishing dialog Error #1543 #2535
base: master
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.
Thanks for getting started on this @Fatehsandhu, I added a couple of comments.
I assume you want to get the content in first before styling it as shown in the issue?
scripts/setup-services.sh
Outdated
@@ -83,7 +83,7 @@ echo "Setting up login.webmaker.org" | |||
cd login.webmaker.org | |||
cp env.sample .env | |||
sudo npm install --no-bin-links --loglevel=error # sudo needed for bcrypt permissions | |||
cd .. |
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.
you def need this back
scripts/setup-services.sh
Outdated
@@ -83,7 +83,7 @@ echo "Setting up login.webmaker.org" | |||
cd login.webmaker.org | |||
cp env.sample .env | |||
sudo npm install --no-bin-links --loglevel=error # sudo needed for bcrypt permissions | |||
cd .. | |||
sudo npm install --no-bin-links || sudo npm install --no-bin-links |
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.
let's remove this and file as a follow-up issue.
locales/en-GB/server.properties
Outdated
@@ -94,6 +94,7 @@ navToggleAutoUpdateLabel=Auto | |||
# Publishing | |||
publishHeader=Publish your Project | |||
publishShareLink=Here's a link you can share... | |||
publishEmbedLinkTitle=Copy this code into your HTML page to show off your project. |
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.
make this change in locales/en-US
not locales/en-GB
views/editor/publish.html
Outdated
<p>{{ gettext("publishShareLink") }}</p> | ||
<div id="publish-link"> | ||
<a id="link-publish-link" title="{{ gettext("publishShareLinkTitle") }}" target="_blank" href="test"></a> | ||
</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.
remove the trailing spaces
views/editor/publish.html
Outdated
@@ -16,10 +16,17 @@ | |||
</div> | |||
|
|||
<div id="publish-live" class="hide"> | |||
|
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 the trailing spaces
views/editor/publish.html
Outdated
<p>{{ gettext("publishShareLink") }}</p> | ||
<div id="publish-link"> | ||
<a id="link-publish-link" title="{{ gettext("publishShareLinkTitle") }}" target="_blank" href="test"></a> | ||
</div> | ||
|
||
<!-- Embed iFrame --> |
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 the extra leading spaces before the comment so that it aligns with the tag
views/editor/publish.html
Outdated
</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.
undo this change
views/editor/publish.html
Outdated
@@ -29,9 +36,9 @@ | |||
|
|||
<div id="publish-details"> | |||
<label>{{ gettext("publishProjectDescription") }}</label> | |||
<textarea class="publish-description" placeholder="{{ gettext("publishProjectDescriptionPlaceholder") }}"></textarea> | |||
<textarea class="publish-description" placeholder="{{ gettext("publishProjectDescriptionPlaceholder") }}"></textarea> |
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.
undo this change
views/editor/publish.html
Outdated
|
||
<!-- Embed iFrame --> | ||
<p>{{ gettext("publishEmbedLinkTitle") }}</p> | ||
<div id="publish-link"> |
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.
you cannot use the same id
here as another element. Change this to publish-embed
.
views/editor/publish.html
Outdated
<!-- Embed iFrame --> | ||
<p>{{ gettext("publishEmbedLinkTitle") }}</p> | ||
<div id="publish-link"> | ||
<span><iframe {{ gettext("PUBLISHED_PROJECTS_HOSTNAME") }} > </span> |
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.
I'm not sure why "PUBLISHED_PROJECTS_HOSTNAME" would be used here.
Instead, leave the text empty and dynamically change the text with JS instead:
@gideonthomas thank you, much appreciated. I will get on those ASAP. |
@gideonthomas My code isn't compiling for some reason, can I please get some help? |
@@ -33,10 +33,11 @@ function Publisher() { | |||
update: $("#publish-button-update"), | |||
unpublish: $("#publish-button-unpublish"), | |||
parent: $("#publish-buttons"), | |||
indexMessage: $("#no-index") | |||
indexMessage: $("#no-index"), |
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.
You have a stray comma here. The last element in a list like this shouldn't get a dangling comma.
@@ -313,7 +314,8 @@ Publisher.prototype.updateDialog = function(publishUrl, allowUnpublish) { | |||
var published = this.dialog.published; | |||
var unpublishBtn = this.dialog.buttons.unpublish; | |||
var unpublish = this.handlers.unpublish; | |||
|
|||
|
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.
It's unhappy with this line for some reason. What happens if you remove this blank line?
I left some comments in the code. These are styling issues. |
@humphd Thanks a lot for the help |
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 needs a little bit more work @Fatehsandhu, but it's getting there.
scripts/setup-services.sh
Outdated
@@ -84,6 +84,7 @@ cd login.webmaker.org | |||
cp env.sample .env | |||
sudo npm install --no-bin-links --loglevel=error # sudo needed for bcrypt permissions | |||
cd .. | |||
sudo npm install --no-bin-links || sudo npm install --no-bin-links |
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.
@Fatehsandhu, please undo this change
@@ -313,7 +314,7 @@ Publisher.prototype.updateDialog = function(publishUrl, allowUnpublish) { | |||
var published = this.dialog.published; | |||
var unpublishBtn = this.dialog.buttons.unpublish; | |||
var unpublish = this.handlers.unpublish; | |||
|
|||
published.embed.text("<iframe src={$publishUrl}></iframe>"); |
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 needs to be:
published.embed.text(`<iframe src=${publishUrl}></iframe>`);
Note the use of `
instead of "
views/editor/publish.html
Outdated
@@ -41,4 +46,4 @@ <h1>{{ gettext("publishHeader") }}</h1> | |||
<div id="publish-button-publish">{{ gettext("publishBtn") }}</div> | |||
</div> | |||
</div> | |||
{% endblock %} | |||
{% endblock %} |
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.
blank line after this
@@ -36,7 +36,8 @@ function Publisher() { | |||
indexMessage: $("#no-index") | |||
}, | |||
description: $("#publish-details > textarea.publish-description"), | |||
publishHeader: $(".content > h1"), | |||
embed: $("#link-publish-embed"), | |||
|
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 this blank line
views/editor/publish.html
Outdated
|
||
<p>{{ gettext("publishEmbedLinkTitle") }}</p> | ||
<div id="link-publish-embed"> | ||
<span id="link-publish-link"></span> |
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.
not sure why you need this span, you don't use it anywhere.
@Fatehsandhu, can you rebase your branch onto master? |
@Fatehsandhu, it looks like the rebase didn't work correctly. I still see commits from master in this PR. Would you be able to only cherry-pick your commits onto master? |
@gideonthomas I am not sure how to do that correctly. |
Hmm, I'm not actually sure how this branch got into this state since it looks like none of your code is in this branch anymore. Maybe @humphd might be able to help you here. |
@Fatehsandhu can you tell me which of the 29 commits in here contain your fix? If I know that, I can guide you through the process to fix this. |
@humphd commit #25abc0f was good. |
@Fatehsandhu I'm confused, you're saying 25abc0f is your fix? That seems wrong to me. Am I misunderstanding? |
@humphd No, sorry I meant to say that I had made all the changes up until that commit. Sorry, I don't have all the changes in one pull request. |
Fixing issue #1543 , Can I get some feedback please