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

Make Scrollbar a Uniform Thinness for Right Pane #958

Closed
wants to merge 4 commits 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
2 changes: 2 additions & 0 deletions apps/antalmanac/src/actions/ActionTypesStore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { EventEmitter } from 'events';

import { RepeatingCustomEvent, ScheduleCourse } from '@packages/antalmanac-types';

import { autoSaveSchedule } from '$actions/AppStoreActions';
import AppStore from '$stores/AppStore';

Expand Down
14 changes: 7 additions & 7 deletions apps/antalmanac/src/actions/AppStoreActions.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { VariantType } from 'notistack';

import { TRPCError } from '@trpc/server';
import { WebsocSection } from 'peterportal-api-next-types';
import { ScheduleCourse } from '@packages/antalmanac-types';
import { RepeatingCustomEvent } from '@packages/antalmanac-types';
import { TRPCError } from '@trpc/server';
import { VariantType } from 'notistack';
import { WebsocSection } from 'peterportal-api-next-types';

import { SnackbarPosition } from '$components/NotificationSnackbar';
import analyticsEnum, { logAnalytics } from '$lib/analytics';
import { warnMultipleTerms } from '$lib/helpers';
import { courseNumAsDecimal } from '$lib/analytics';
import trpc from '$lib/api/trpc';
import { CourseDetails } from '$lib/course_data.types';
import { warnMultipleTerms } from '$lib/helpers';
import AppStore from '$stores/AppStore';
import trpc from '$lib/api/trpc';
import { courseNumAsDecimal } from '$lib/analytics';

export interface CopyScheduleOptions {
onSuccess: (index: number) => unknown;
Expand Down
5 changes: 3 additions & 2 deletions apps/antalmanac/src/components/Calendar/CalendarRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import { Calendar, DateLocalizer, momentLocalizer, Views } from 'react-big-calen

import CalendarToolbar from './CalendarToolbar';
import CourseCalendarEvent, { CalendarEvent, CourseEvent } from './CourseCalendarEvent';

import locationIds from '$lib/location_ids';
import { getDefaultFinalsStartDate, getFinalsStartDateForTerm } from '$lib/termData';
import AppStore from '$stores/AppStore';
import locationIds from '$lib/location_ids';
import { useTimeFormatStore } from '$stores/SettingsStore';
import { useHoveredStore } from '$stores/HoveredStore';
import { useTimeFormatStore } from '$stores/SettingsStore';

const localizer = momentLocalizer(moment);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button, Box } from '@material-ui/core';
import React, { useEffect, useState } from 'react';

import { useThemeStore } from '$stores/SettingsStore';

const normal_days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import {
FormControlLabel,
} from '@material-ui/core';
import { CloudDownload, Save } from '@material-ui/icons';
import { LoadingButton } from '@mui/lab';
import { ChangeEvent, PureComponent, useEffect, useState } from 'react';

import { LoadingButton } from '@mui/lab';
import actionTypesStore from '$actions/ActionTypesStore';
import { loadSchedule, saveSchedule } from '$actions/AppStoreActions';
import { useThemeStore } from '$stores/SettingsStore';
import AppStore from '$stores/AppStore';
import actionTypesStore from '$actions/ActionTypesStore';
import { useThemeStore } from '$stores/SettingsStore';

interface LoadSaveButtonBaseProps {
action: typeof saveSchedule;
Expand Down
10 changes: 5 additions & 5 deletions apps/antalmanac/src/components/Header/SettingsMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { useCallback, useState } from 'react';
import { Box, Button, ButtonGroup, Drawer, IconButton, Switch, Typography, useMediaQuery } from '@material-ui/core';
import { Divider, Stack, Tooltip } from '@mui/material';
import { CSSProperties } from '@material-ui/core/styles/withStyles';
import { Close, DarkMode, Help, LightMode, Settings, SettingsBrightness } from '@mui/icons-material';
import { Divider, Stack, Tooltip } from '@mui/material';
import { useCallback, useState } from 'react';

import { usePreviewStore, useThemeStore, useTimeFormatStore, useAutoSaveStore } from '$stores/SettingsStore';
import useCoursePaneStore from '$stores/CoursePaneStore';
import appStore from '$stores/AppStore';
import actionTypesStore from '$actions/ActionTypesStore';
import { autoSaveSchedule } from '$actions/AppStoreActions';
import appStore from '$stores/AppStore';
import useCoursePaneStore from '$stores/CoursePaneStore';
import { usePreviewStore, useThemeStore, useTimeFormatStore, useAutoSaveStore } from '$stores/SettingsStore';

const lightSelectedStyle: CSSProperties = {
backgroundColor: '#F0F7FF',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
import { useCallback, useEffect, useState } from 'react';
import LazyLoad from 'react-lazyload';

import { Alert, Box, GlobalStyles, IconButton, useMediaQuery } from '@mui/material';
import { Close } from '@mui/icons-material';
import { Alert, Box, IconButton, useMediaQuery } from '@mui/material';
import { AACourse, AASection } from '@packages/antalmanac-types';
import { WebsocDepartment, WebsocSchool, WebsocAPIResponse, GE } from 'peterportal-api-next-types';
import { useCallback, useEffect, useState } from 'react';
import LazyLoad from 'react-lazyload';

import RightPaneStore from '../RightPaneStore';
import GeDataFetchProvider from '../SectionTable/GEDataFetchProvider';
import SectionTableLazyWrapper from '../SectionTable/SectionTableLazyWrapper';

import SchoolDeptCard from './SchoolDeptCard';
import darkModeLoadingGif from './SearchForm/Gifs/dark-loading.gif';
import loadingGif from './SearchForm/Gifs/loading.gif';
import darkNoNothing from './static/dark-no_results.png';
import noNothing from './static/no_results.png';
import AppStore from '$stores/AppStore';
import { useThemeStore } from '$stores/SettingsStore';
import Grades from '$lib/grades';
import analyticsEnum from '$lib/analytics';

import { openSnackbar } from '$actions/AppStoreActions';
import analyticsEnum from '$lib/analytics';
import Grades from '$lib/grades';
import WebSOC from '$lib/websoc';
import AppStore from '$stores/AppStore';
import { useHoveredStore } from '$stores/HoveredStore';
import { useThemeStore } from '$stores/SettingsStore';

function getColors() {
const courseColors = AppStore.schedule.getCurrentCourses().reduce(
Expand Down Expand Up @@ -285,7 +287,6 @@ export default function CourseRenderPane(props: { id?: number }) {
<RecruitmentBanner />
<Box>
<Box sx={{ height: '50px', marginBottom: '5px' }} />
<GlobalStyles styles={{ '*::-webkit-scrollbar': { height: '8px' } }} />
{courseData.map((_: WebsocSchool | WebsocDepartment | AACourse, index: number) => {
let heightEstimate = 200;
if ((courseData[index] as AACourse).sections !== undefined)
Expand Down
8 changes: 6 additions & 2 deletions apps/antalmanac/src/components/RightPane/RightPaneRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { Link } from 'react-router-dom';
import { Box, Paper, Tab, Tabs, Typography } from '@material-ui/core';
import { FormatListBulleted, MyLocation, Search } from '@material-ui/icons';
import { GlobalStyles } from '@mui/material';
import React, { Suspense } from 'react';
import { Link } from 'react-router-dom';

import AddedCoursePane from './AddedCourses/AddedCoursePane';
import CoursePane from './CoursePane/CoursePaneRoot';
import darkModeLoadingGif from './CoursePane/SearchForm/Gifs/dark-loading.gif';
import loadingGif from './CoursePane/SearchForm/Gifs/loading.gif';
import { useTabStore } from '$stores/TabStore';

import { useThemeStore } from '$stores/SettingsStore';
import { useTabStore } from '$stores/TabStore';


const UCIMap = React.lazy(() => import('../Map'));

Expand Down Expand Up @@ -60,6 +63,7 @@ export default function Desktop({ style }: DesktopTabsProps) {

return (
<Box style={{ ...style, margin: '0 4px' }}>
<GlobalStyles styles={{ '*::-webkit-scrollbar': { height: '8px' } }} />
<Paper elevation={0} variant="outlined" square style={{ borderRadius: '4px 4px 0 0' }}>
<Tabs
value={activeTab}
Expand Down
10 changes: 6 additions & 4 deletions apps/antalmanac/src/stores/AppStore.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { EventEmitter } from 'events';
import { VariantType } from 'notistack';

import { ScheduleCourse, ScheduleSaveState, RepeatingCustomEvent } from '@packages/antalmanac-types';
import { VariantType } from 'notistack';

import { Schedules } from './Schedules';
import { SnackbarPosition } from '$components/NotificationSnackbar';
import { CalendarEvent, CourseEvent } from '$components/Calendar/CourseCalendarEvent';
import { useTabStore } from '$stores/TabStore';

import actionTypesStore from '$actions/ActionTypesStore';
import type {
AddCourseAction,
Expand All @@ -19,6 +18,9 @@ import type {
ChangeCourseColorAction,
UndoAction,
} from '$actions/ActionTypesStore';
import { CalendarEvent, CourseEvent } from '$components/Calendar/CourseCalendarEvent';
import { SnackbarPosition } from '$components/NotificationSnackbar';
import { useTabStore } from '$stores/TabStore';

class AppStore extends EventEmitter {
schedule: Schedules;
Expand Down
4 changes: 3 additions & 1 deletion apps/antalmanac/src/stores/HoveredStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { create } from 'zustand';
import { AASection, ScheduleCourse } from '@packages/antalmanac-types';
import { create } from 'zustand';

import { calendarizeCourseEvents, calendarizeFinals } from './calendarizeHelpers';

import { CourseEvent } from '$components/Calendar/CourseCalendarEvent';
import { CourseDetails } from '$lib/course_data.types';

Expand Down
1 change: 1 addition & 0 deletions apps/antalmanac/src/stores/SettingsStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { create } from 'zustand';

import analyticsEnum, { logAnalytics } from '$lib/analytics';

export type ThemeSetting = 'light' | 'dark' | 'system';
Expand Down
Loading