Skip to content

Portfolio Development#2

Open
isabelbaez wants to merge 3 commits into
mainfrom
IsabelBaezDevelopment
Open

Portfolio Development#2
isabelbaez wants to merge 3 commits into
mainfrom
IsabelBaezDevelopment

Conversation

@isabelbaez

Copy link
Copy Markdown
Owner

No description provided.

@jayceb04 jayceb04 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you add a screenshot of the parts of the portfolio you edit to the commit description. It makes it really helpful to be able to see the visual outcome produced by the code.

Comment thread portfolio/src/main/webapp/index.html Outdated
</div>
<img id='facepic' src="/images/face.jpeg" />
<div class="wordsContainer">
<p>My name is Isabel Báez and I am a sophmore at MIT. I'm majoring in Computer Science and minoring in Design. My favorite food is sushi and I'm currently obsessed with Criminal Minds. This is my portfolio.</p>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

When possible, try to wrap long lines of texts. It helps make the code a little easier to read (no side scrolling).

https://google.github.io/styleguide/htmlcssguide.html#HTML_Line-Wrapping

Comment on lines +13 to +19
/** ONE HARD CODED STRING
* @Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.setContentType("text/html;");
response.getWriter().println("I did it!");
}
} */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Go ahead and remove commented code if you don't plan to use it.

Comment on lines +49 to +50
Gson gson = new Gson();
String json = gson.toJson(sentences);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would just use this in your doGet method and remove both the helper methods convertToJson and convertToJsonUsingGson

Comment thread portfolio/src/main/webapp/script.js Outdated
Comment on lines +30 to +36
async function showString() {
const responseFromServer = await fetch('/string');
const textFromResponse = await responseFromServer.text();

const stringContainer = document.getElementById('string-container');
stringContainer.innerText = textFromResponse;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks like this isn't used anymore?

Comment thread portfolio/src/main/webapp/script.js Outdated
stringsListElement.innerHTML = '';

stringsListElement.appendChild(
createListElement(strings[getRndString(1, 4)]));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If you use gson.toJson, then I think you can use strings[Math.floor(Math.random() * strings.length)] here.

@isabelbaez isabelbaez changed the title Build profile page. Style css. Add tech and images page. Portfolio Development Mar 20, 2021

@jayceb04 jayceb04 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The code looks great. Could you add a couple of screenshots to the PR descriptions that show:

  1. Your input boxes on your website and what appears after a request.
  2. An example of the site before and after a translation


<div class="Names">
<p>First Name:</p>
<textarea class=textBox name="first-input">John</textarea>

@jayceb04 jayceb04 Mar 22, 2021

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

OPTIONAL: You may want to use the input tag here instead of textarea. If you do, you can add type annotations so will automatically check the validity of the input for you. Here's and example: https://www.w3schools.com/html/html_form_input_types.asp

@@ -0,0 +1,12 @@
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you can include this file in your .gitignore file. When you run the code locally from your Cloudshell it should still be able to read the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants