Skip to content
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

Fix Swap wasp.png to wasp.svg #1538

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import waspLogo from './waspLogo.png'
import waspLogo from './waspLogo.svg'

Copy link
Member

Choose a reason for hiding this comment

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

All these changes you did in examples -> they are not really needed. It doesn't really matter if they use waspLogo.png, it is just a file generated at start. So I would revert these changes.

Copy link
Member

Choose a reason for hiding this comment

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

Also, most of the example you corrected only half way -> you changed the import, but didn't swap .png file with .svg file. You did that in only one example. So I believe only one example works correctly.

const WaspSourceHeader = (props) => {
const divStyle = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import waspLogo from './waspLogo.png'
import waspLogo from './waspLogo.svg'

const WaspSourceHeader = (props) => {
const divStyle = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import waspLogo from '../waspLogo.png';
import waspLogo from '../waspLogo.svg';
import { Star } from 'react-feather';

export const DiscordIcon = () => (
Expand Down
Binary file not shown.
8 changes: 8 additions & 0 deletions examples/hackathon-submissions/src/client/waspLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/realworld/src/client/WaspSourceHeader.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import waspLogo from './waspLogo.png'
import waspLogo from './waspLogo.svg'

const WaspSourceHeader = (props) => {
const divStyle = {
Expand Down
2 changes: 1 addition & 1 deletion examples/todo-app-in-typescript/src/client/MainPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FormEventHandler, FormEvent } from "react";
import waspLogo from "./waspLogo.png";
import waspLogo from "./waspLogo.svg";

import "./Main.css";
// Wasp imports 🐝 = }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import waspLogo from './waspLogo.png'
import waspLogo from './waspLogo.svg'

const WaspSourceHeader = (props) => {
const divStyle = {
Expand Down
4 changes: 2 additions & 2 deletions waspc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ This was the file tree of a newly generated project in the previous version of W
│   ├── Main.css
│   ├── MainPage.js
│   ├── .waspignore
│   └── waspLogo.png
│   └── waspLogo.svg
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be changed, this and the line below, since this is ChangeLog -> so this is how it was at that point in the time and should be kept that way.

├── .gitignore
├── main.wasp
└── .wasproot
Expand All @@ -920,7 +920,7 @@ get by running `wasp new project` from this point onwards):
│   │   ├── MainPage.jsx
│   │   ├── react-app-env.d.ts
│   │   ├── tsconfig.json
│   │   └── waspLogo.png
│   │   └── waspLogo.svg
│   ├── server
│   │   └── tsconfig.json
│   ├── shared
Expand Down
2 changes: 1 addition & 1 deletion waspc/data/Cli/templates/basic/src/client/MainPage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import waspLogo from './waspLogo.png'
import waspLogo from './waspLogo.svg'
import './Main.css'
Copy link
Member

Choose a reason for hiding this comment

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

This is really one of the most important changes, this change here.
This tells Wasp to, when it generates new project, use .svg in it.
But that waspLogo.svg, you need to provide it also somewhere in the data/Cli/templates/basic/src/client/ dir, I don't think you did though, I don't think you replaced that waspLogo.png with waspLogo.svg? You should do that.


const MainPage = () => {
Expand Down
4 changes: 2 additions & 2 deletions waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions waspc/e2e-test/test-outputs/waspJob-golden/files.manifest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion waspc/e2e-test/test-outputs/waspNew-golden/files.manifest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/blog/2022-11-29-typescript-feature-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This will generate a project skeleton in the folder `myApp`. The project structu
│   │   ├── MainPage.jsx
│   │   ├── react-app-env.d.ts
│   │   ├── tsconfig.json
│   │   └── waspLogo.png
│   │   └── waspLogo.svg
Copy link
Member

Choose a reason for hiding this comment

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

Old blog post, so let's keep it as it was.

│   ├── server # Your server code (Node JS) goes here.
│   │   └── tsconfig.json
│   ├── shared # Your shared (runtime independent) code goes here.
Expand Down
4 changes: 2 additions & 2 deletions web/blog/2023-06-27-build-your-own-twitter-agent-langchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ Ok, but what good is a function that fetches the data if we’ve got nowhere to
Let’s go now to our `src/client/MainPage.tsx` file (make sure it’s got the `.tsx` extension and not `.jsx`) and replace the contents with these below:

```tsx
import waspLogo from './waspLogo.png'
import waspLogo from './waspLogo.svg'
Copy link
Member

Choose a reason for hiding this comment

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

Also old blog post, let's keep it as it was.

import './Main.css'

const MainPage = () => {
Expand Down Expand Up @@ -1208,7 +1208,7 @@ Next, we want our page to perform the following actions:
That’s exactly what the below code will do. Go ahead and replace the `MainPage` with it and take a minute to review what’s going on:

```tsx
import waspLogo from './waspLogo.png';
import waspLogo from './waspLogo.svg';
import './Main.css';
import { useState } from 'react';
import generateNewIdeas from '@wasp/actions/generateNewIdeas';
Expand Down
2 changes: 1 addition & 1 deletion web/docs/project/css-frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ With these files present, Wasp installs the necessary dependencies and copies yo
│   │   ├── tsconfig.json
│   │   ├── Main.css
│   │   ├── MainPage.js
│   │   └── waspLogo.png
│   │   └── waspLogo.svg
│   ├── server
│   │   └── tsconfig.json
│   └── shared
Expand Down
2 changes: 1 addition & 1 deletion web/docs/tutorial/02-project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ After creating a new Wasp project, you'll get a file structure that looks like t
│   │   ├── tsconfig.json
│   │   ├── vite.config.ts
│   │   ├── vite-env.d.ts
│   │   └── waspLogo.png
│   │   └── waspLogo.svg
│   ├── server # Your server code (Node JS) goes here.
│   │   └── tsconfig.json
│   ├── shared # Your shared (runtime independent) code goes here.
Expand Down
6 changes: 3 additions & 3 deletions web/docs/tutorial/03-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Let's take a look at the React component referenced by the page declaration:
<TabItem value="js" label="JavaScript">

```jsx title="src/client/MainPage.jsx"
import waspLogo from './waspLogo.png'
import waspLogo from './waspLogo.svg'
import './Main.css'

const MainPage = () => {
Expand All @@ -61,7 +61,7 @@ export default MainPage
<TabItem value="ts" label="TypeScript">

```tsx title="src/client/MainPage.tsx"
import waspLogo from './waspLogo.png'
import waspLogo from './waspLogo.svg'
import './Main.css'

const MainPage = () => {
Expand Down Expand Up @@ -148,7 +148,7 @@ Since you are using Typescript, you can benefit from using Wasp's type-safe `Lin

## Cleaning Up

Let's prepare for building the Todo app by cleaning up the project and removing files and code we won't need. Start by deleting `Main.css`, `waspLogo.png`, and `HelloPage.{jsx,tsx}` that we just created in the `src/client/` folder.
Let's prepare for building the Todo app by cleaning up the project and removing files and code we won't need. Start by deleting `Main.css`, `waspLogo.svg`, and `HelloPage.{jsx,tsx}` that we just created in the `src/client/` folder.

Since we deleted `HelloPage.{jsx,tsx}`, we also need to remember to remove the `route` and `page` declarations we wrote for it. Your Wasp file should now look like this:

Expand Down
Loading