Adding embed snippet to Thimble publishing dialog Error #1543#2535
Adding embed snippet to Thimble publishing dialog Error #1543#2535Fatehsandhu wants to merge 29 commits intomozilla:masterfrom
Conversation
gideonthomas
left a comment
There was a problem hiding this comment.
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?
| 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.
you def need this back
scripts/setup-services.sh
Outdated
| 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.
let's remove this and file as a follow-up issue.
locales/en-GB/server.properties
Outdated
| # 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.
make this change in locales/en-US not locales/en-GB
views/editor/publish.html
Outdated
| <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.
remove the trailing spaces
views/editor/publish.html
Outdated
| </div> | ||
|
|
||
| <div id="publish-live" class="hide"> | ||
|
|
There was a problem hiding this comment.
remove the trailing spaces
views/editor/publish.html
Outdated
| <a id="link-publish-link" title="{{ gettext("publishShareLinkTitle") }}" target="_blank" href="test"></a> | ||
| </div> | ||
|
|
||
| <!-- Embed iFrame --> |
There was a problem hiding this comment.
remove the extra leading spaces before the comment so that it aligns with the tag
views/editor/publish.html
Outdated
| <textarea class="publish-description" placeholder="{{ gettext("publishProjectDescriptionPlaceholder") }}"></textarea> | ||
| </div> | ||
|
|
||
views/editor/publish.html
Outdated
| <div id="publish-details"> | ||
| <label>{{ gettext("publishProjectDescription") }}</label> | ||
| <textarea class="publish-description" placeholder="{{ gettext("publishProjectDescriptionPlaceholder") }}"></textarea> | ||
| <textarea class="publish-description" placeholder="{{ gettext("publishProjectDescriptionPlaceholder") }}"></textarea> |
views/editor/publish.html
Outdated
|
|
||
| <!-- Embed iFrame --> | ||
| <p>{{ gettext("publishEmbedLinkTitle") }}</p> | ||
| <div id="publish-link"> |
There was a problem hiding this comment.
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.
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? |
| unpublish: $("#publish-button-unpublish"), | ||
| parent: $("#publish-buttons"), | ||
| indexMessage: $("#no-index") | ||
| indexMessage: $("#no-index"), |
There was a problem hiding this comment.
You have a stray comma here. The last element in a list like this shouldn't get a dangling comma.
| var unpublishBtn = this.dialog.buttons.unpublish; | ||
| var unpublish = this.handlers.unpublish; | ||
|
|
||
|
|
There was a problem hiding this comment.
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 |
gideonthomas
left a comment
There was a problem hiding this comment.
this needs a little bit more work @Fatehsandhu, but it's getting there.
scripts/setup-services.sh
Outdated
| 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 |
| 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.
this needs to be:
published.embed.text(`<iframe src=${publishUrl}></iframe>`);Note the use of ` instead of "
views/editor/publish.html
Outdated
| </div> | ||
| </div> | ||
| {% endblock %} | ||
| {% endblock %} No newline at end of file |
There was a problem hiding this comment.
blank line after this
| description: $("#publish-details > textarea.publish-description"), | ||
| publishHeader: $(".content > h1"), | ||
| embed: $("#link-publish-embed"), | ||
|
|
There was a problem hiding this comment.
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.
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