Skip to content

Commit

Permalink
merged 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
aasimsyed committed May 17, 2024
2 parents f6b7371 + 5c425ef commit 951920b
Show file tree
Hide file tree
Showing 24 changed files with 101 additions and 133 deletions.
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,31 @@ activist is very open to contributions from people in the early stages of their

## Development environment [``](#contents)

1. First and foremost, please see the suggested IDE extensions in the dropdown below to make sure that your editor is set up properly.
1. First and foremost, please see the suggested IDE setup in the dropdown below to make sure that your editor is ready for development.

> [!IMPORTANT]
>
> <details><summary>Suggested IDE extensions</summary>
> <details><summary>Suggested IDE setup</summary>
>
> <p>
>
> VS Code
>
> Install the following extensions:
>
> - [batisteo.vscode-django](https://marketplace.visualstudio.com/items?itemName=batisteo.vscode-django)
> - [bradlc.vscode-tailwindcss](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
> - [charliermarsh.ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
> - [esbenp.prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
> - [streetsidesoftware.code-spell-checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
> - [Vue.volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
>
> WebStorm
>
> - Check out the [Vue.js development docs](https://www.jetbrains.com/help/webstorm/vue-js.html)
> - Make sure a [local Node.js interpreter](https://www.jetbrains.com/help/webstorm/developing-node-js-applications.html#ws_node_configure_local_node_interpreter) is configured in your project
> - Make sure the [Vue.js plugin](https://github.com/JetBrains/intellij-plugins/tree/master/vuejs) and [JavaScript Debugger](https://www.jetbrains.com/help/webstorm/configuring-javascript-debugger.html) are enabled in the plugins page of the settings
>
> </p>
> </details>
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,31 @@ We would be happy to discuss granting you further rights as a contributor after

# Environment setup [``](#contents)

1. First and foremost, please see the suggested IDE extensions in the dropdown below to make sure that your editor is set up properly.
1. First and foremost, please see the suggested IDE setup in the dropdown below to make sure that your editor is ready for development.

> [!IMPORTANT]
>
> <details><summary>Suggested IDE extensions</summary>
> <details><summary>Suggested IDE setup</summary>
>
> <p>
>
> VS Code
>
> Install the following extensions:
>
> - [batisteo.vscode-django](https://marketplace.visualstudio.com/items?itemName=batisteo.vscode-django)
> - [bradlc.vscode-tailwindcss](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
> - [charliermarsh.ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
> - [esbenp.prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
> - [streetsidesoftware.code-spell-checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
> - [Vue.volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
>
> WebStorm
>
> - Check out the [Vue.js development docs](https://www.jetbrains.com/help/webstorm/vue-js.html)
> - Make sure a [local Node.js interpreter](https://www.jetbrains.com/help/webstorm/developing-node-js-applications.html#ws_node_configure_local_node_interpreter) is configured in your project
> - Make sure the [Vue.js plugin](https://github.com/JetBrains/intellij-plugins/tree/master/vuejs) and [JavaScript Debugger](https://www.jetbrains.com/help/webstorm/configuring-javascript-debugger.html) are enabled in the plugins page of the settings
>
> </p>
> </details>
Expand Down
3 changes: 1 addition & 2 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ PRs are always welcome to improve the developer experience and project infrastru
Currently `typescript.strict` and `typescript.typeCheck` in `nuxt.config.ts` are not enabled. This may change in the future. Strict type checks are not enabled to allow building the app outside `Docker`. Local and Netlify builds proceed despite TS errors with strict checks disabled.

> [!NOTE]
> For VS Code users: it is recommended to install these extensions to enable in-editor type-checking:
> For VS Code users: it is recommended to install the following extension to enable in-editor type-checking:
>
> - [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
> - [Volar TS](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin)
### Vue Single File Component (.vue file) Guidelines

Expand Down
6 changes: 3 additions & 3 deletions backend/authentication/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def post(self, request: Request) -> Response:
serializer.save()

return Response(
{"message": "User was created successful"},
{"message": "User was created successfully"},
status=status.HTTP_201_CREATED,
)

Expand All @@ -95,7 +95,7 @@ def post(self, request: Request) -> Response:
login(request, serializer.validated_data.get("user"))

return Response(
{"message": "User was logged in successful"},
{"message": "User was logged in successfully"},
status=status.HTTP_200_OK,
)

Expand All @@ -116,6 +116,6 @@ def delete(self, request: Request, pk: UUID | str) -> Response:
user.delete()

return Response(
{"message": "User was deleted successful"},
{"message": "User was deleted successfully"},
status=status.HTTP_204_NO_CONTENT,
)
2 changes: 1 addition & 1 deletion frontend/components/FriendlyCaptcha.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<vue-friendly-captcha
v-if="!inDevMode"
@done="verifyCaptcha"
class="rounded-md"
class="elem-shadow-sm h-min rounded-md"
:sitekey="`${FRIENDLY_CAPTCHA_KEY}`"
:dark="$colorMode.value === 'dark'"
startMode="auto"
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/card/CardAbout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<p
ref="description"
:class="{
'line-clamp-3': !expandText,
'line-clamp-5': !expandText,
}"
>
{{ organization.description }}
Expand Down Expand Up @@ -121,7 +121,7 @@
<p
ref="description"
:class="{
'line-clamp-3': !expandText,
'line-clamp-5': !expandText,
}"
>
{{ group.description }}
Expand Down
10 changes: 4 additions & 6 deletions frontend/components/menu/mobile/MenuMobileNavigationDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,21 @@ const pathToSidebarTypeMap = [
path: "organizations",
type: isOrgPage.value
? SidebarType.ORGANIZATION_PAGE
: SidebarType.FILTER_ORGANIZATIONS,
: SidebarType.ORGANIZATION_FILTER,
},
{
path: "events",
type: isEventPage.value
? SidebarType.EVENT_PAGE
: SidebarType.FILTER_EVENTS,
type: isEventPage.value ? SidebarType.EVENT_PAGE : SidebarType.EVENT_FILTER,
},
];
watch([isOrgPage, isEventPage], () => {
pathToSidebarTypeMap[2].type = isOrgPage.value
? SidebarType.ORGANIZATION_PAGE
: SidebarType.FILTER_ORGANIZATIONS;
: SidebarType.ORGANIZATION_FILTER;
pathToSidebarTypeMap[3].type = isEventPage.value
? SidebarType.EVENT_PAGE
: SidebarType.FILTER_EVENTS;
: SidebarType.EVENT_FILTER;
});
const sidebarType = computed(() => {
Expand Down
28 changes: 13 additions & 15 deletions frontend/components/sidebar/left/SidebarLeft.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,21 @@ const pathToSidebarTypeMap = [
path: "organizations",
type: isOrgPage.value
? SidebarType.ORGANIZATION_PAGE
: SidebarType.FILTER_ORGANIZATIONS,
: SidebarType.ORGANIZATION_FILTER,
},
{
path: "events",
type: isEventPage.value
? SidebarType.EVENT_PAGE
: SidebarType.FILTER_EVENTS,
type: isEventPage.value ? SidebarType.EVENT_PAGE : SidebarType.EVENT_FILTER,
},
];
watch([isOrgPage, isEventPage], () => {
pathToSidebarTypeMap[2].type = isOrgPage.value
? SidebarType.ORGANIZATION_PAGE
: SidebarType.FILTER_ORGANIZATIONS;
: SidebarType.ORGANIZATION_FILTER;
pathToSidebarTypeMap[3].type = isEventPage.value
? SidebarType.EVENT_PAGE
: SidebarType.FILTER_EVENTS;
: SidebarType.EVENT_FILTER;
});
const sidebarType = computed(() => {
Expand All @@ -133,7 +131,7 @@ for (const key in Topic) {
const filters = {
daysAhead: {
sidebarType: [SidebarType.FILTER_EVENTS],
sidebarType: [SidebarType.EVENT_FILTER],
title: "Days ahead",
name: "daysAhead",
type: "radio",
Expand All @@ -155,7 +153,7 @@ const filters = {
],
},
eventType: {
sidebarType: [SidebarType.FILTER_EVENTS],
sidebarType: [SidebarType.EVENT_FILTER],
title: "Event type",
name: "eventType",
type: "checkbox",
Expand All @@ -174,7 +172,7 @@ const filters = {
],
},
locationType: {
sidebarType: [SidebarType.FILTER_EVENTS],
sidebarType: [SidebarType.EVENT_FILTER],
title: "Location",
name: "locationType",
type: "checkbox",
Expand All @@ -192,31 +190,31 @@ const filters = {
],
},
eventLocationSearch: {
sidebarType: [SidebarType.FILTER_EVENTS],
sidebarType: [SidebarType.EVENT_FILTER],
title: "",
name: "eventLocationSearch",
type: "search",
placeholder: "components.sidebar-left.location-search-placeholder",
},
locationSearch: {
sidebarType: [SidebarType.FILTER_ORGANIZATIONS, SidebarType.SEARCH],
sidebarType: [SidebarType.ORGANIZATION_FILTER, SidebarType.SEARCH],
title: "Location",
name: "locationSearch",
type: "search",
placeholder: "components.sidebar-left.location-search-placeholder",
},
organizationSearch: {
sidebarType: [SidebarType.FILTER_EVENTS],
sidebarType: [SidebarType.EVENT_FILTER],
title: "Organization",
name: "organizationSearch",
type: "search",
placeholder: "components.sidebar-left.orgs-search-placeholder",
},
topic: {
sidebarType: [
SidebarType.FILTER_EVENTS,
SidebarType.FILTER_ORGANIZATIONS,
SidebarType.FILTER_RESOURCES,
SidebarType.EVENT_FILTER,
SidebarType.ORGANIZATION_FILTER,
SidebarType.RESOURCES_FILTER,
SidebarType.SEARCH,
],
title: "Topic",
Expand Down
28 changes: 5 additions & 23 deletions frontend/pages/events/[id]/discussion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,21 @@
/>
</div>
</HeaderAppPage>
<div class="space-y-6 pb-6 pt-3 md:pt-4">
<PagePreviewDiscussion />
<!-- <div v-if="event.discussion" class="space-y-6 pb-6 pt-3 md:pt-4">
<Discussion
:discussionInput="discussionInput"
:discussionEntries="[discussionEntry, discussionEntry]"
:discussionInput="event.discussion"
:discussionEntries="[event.discussion?.entries]"
:organizations="event.organizations"
/>
</div>
<EmptyState v-else pageType="discussions" :permission="false" /> -->
</div>
</template>

<script setup lang="ts">
import type { DiscussionEntry } from "~/types/discussion-entry";
import type { DiscussionInput } from "~/types/discussion-input";
import { IconMap } from "~/types/icon-map";
import { testClimateEvent } from "~/utils/testEntities";
const event = testClimateEvent;
const discussionEntry: DiscussionEntry = {
id: 1,
author: "John A. Tester",
content:
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.",
votes: 123,
date: new Date(),
};
const discussionInput: DiscussionInput = {
name: "Text ",
location: "Testerville, TN",
supporters: 123,
description: "I love to test!",
category: "Category",
highRisk: false,
};
</script>
17 changes: 10 additions & 7 deletions frontend/pages/events/[id]/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@
/>
</div>
</HeaderAppPage>
<CardDangerZone
:description="$t('components.card-danger-zone.event-description')"
:ctaBtnText="$t('components.card-danger-zone.event-cta-btn-text')"
:ctaBtnAriaLabel="
$t('components.card-danger-zone.event-cta-btn-aria-label')
"
/>
<PagePreviewSettings />
<!-- <div class="space-y-6 pb-6">
<CardDangerZone
:description="$t('components.card-danger-zone.event-description')"
:ctaBtnText="$t('components.card-danger-zone.event-cta-btn-text')"
:ctaBtnAriaLabel="
$t('components.card-danger-zone.event-cta-btn-aria-label')
"
/>
</div> -->
</div>
</template>

Expand Down
1 change: 1 addition & 0 deletions frontend/pages/events/[id]/tasks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/>
</div>
</HeaderAppPage>
<PagePreviewTasks />
<!-- <div v-if="event.tasks" class="space-y-3 py-4"></div>
<EmptyState v-else pageType="tasks" :permission="false" /> -->
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/pages/events/[id]/team.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/>
</div>
</HeaderAppPage>
<PagePreviewTeam />
<!-- <div v-if="event.members" class="space-y-3 py-4">
<CardSearchResultUser
v-for="(u, i) in event.members"
Expand Down
21 changes: 12 additions & 9 deletions frontend/pages/events/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@
<ComboboxTopics />
</div>
</HeaderAppPage>
<div v-if="events">
<div v-for="event in events" class="space-y-6 pb-6 pt-3 md:pt-4">
<PagePreviewEvent />
<!-- <div v-if="events.results.length > 0">
<div v-for="event in events.results" class="space-y-6 pb-6 pt-3 md:pt-4">
<CardSearchResultEvent :isPrivate="false" :event="event" />
</div>
</div>
<EmptyState v-else pageType="events" :permission="false" />
<EmptyState v-else pageType="events" :permission="false" /> -->
</div>
</template>

<script setup lang="ts">
const { data: events } = await useFetch(
`${BASE_BACKEND_URL}/entities/organization_events/`,
{
method: "GET",
}
);
// import type { Event } from "~/types/event";
// const { data: events } = await useFetch<Event[] | undefined>(
// `${BASE_BACKEND_URL}/entities/organization_events/`,
// {
// method: "GET",
// }
// );
</script>
Loading

0 comments on commit 951920b

Please sign in to comment.