Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
84b135b
Split off hinter functionality into a separate file
khanniie Jan 24, 2025
10da30e
update docstring in hinter
khanniie Jan 24, 2025
44e5cfc
move csslint to hint file
khanniie Jan 28, 2025
850845a
fix bug where i forgot to pass in the cm instance to hide the hinter
khanniie Jan 31, 2025
4d9b05f
Merge pull request #3327 from processing/connie-editor-conversion-hin…
khanniie Jan 31, 2025
0651ccf
Moves the tidier code and file mode out of editor file
khanniie Feb 7, 2025
f7cbcab
Merge pull request #3335 from processing/connie-editor-conversion-uti…
raclim Feb 7, 2025
dc1b51d
Merge branch 'develop' into connie-develop
khanniie Mar 7, 2025
249e728
Merge branch 'develop' into connie-develop
khanniie Mar 28, 2025
fe0d19f
fix Exiting Multi-Line Cursor Doesnt Return to the Original Cursor
Vishawdeep-Singh Dec 24, 2024
ce37415
remove extra console log
raclim Feb 7, 2025
c1102d9
pull out codemirror test
khanniie Feb 14, 2025
2c917a2
Convert editor file to functional
khanniie Feb 28, 2025
55bb4a5
change CM fifle to a useCodeMirror custom hook
khanniie Mar 7, 2025
7c822b1
fix codemirror file debounce bug
khanniie Mar 23, 2025
1e575f9
fix codemirrorr bug with debouncer again
khanniie Mar 23, 2025
107e9bf
only useeffect on file id change
khanniie Mar 23, 2025
e45d265
switches from using usePrevious to an existing hook
khanniie Mar 23, 2025
0ac3234
moves document management to the cm file
khanniie Mar 23, 2025
f3f7ab4
fix test error
khanniie Mar 24, 2025
6d7ef6d
fix mobile bug
khanniie Mar 28, 2025
ea815f7
adds comments, removes a logic block that wasn't doing anything
khanniie Mar 28, 2025
36c4129
add TODO
khanniie Mar 28, 2025
9fd608d
Merge pull request #3352 from processing/connie-editor-conversion-spl…
raclim Mar 28, 2025
172d573
merge develop into cm-develop
khanniie May 30, 2025
52a3b53
merge old develop branch into connie's cm develop branch
khanniie Jul 6, 2025
5d3d93d
codemirror v5 -> v6
khanniie May 23, 2025
619f1c4
Update codemirror.js
khanniie May 30, 2025
2e85808
remove unused cm5 styles
khanniie May 30, 2025
c12d18a
remove cm5 plugins
khanniie May 30, 2025
f8f6dab
git didnt track the file case rename so i renamed it back
khanniie May 30, 2025
ec5eb21
update comments tracking TODOs
khanniie May 30, 2025
d2269a1
fix getfilemode not exported
khanniie May 30, 2025
4f35218
fix the nonscrolling issue
khanniie Jul 4, 2025
0cf467a
Update codemirror.js
khanniie Jul 6, 2025
d6ef821
fix consoleinput for cm v6
khanniie Jul 7, 2025
b1890c8
remove leftover console log
khanniie Jul 7, 2025
422ed0f
add ts support for tests to fix testing errors
khanniie Jul 7, 2025
f8a57d5
update comment docs
khanniie Jul 7, 2025
d2071f7
Add back teardown function
khanniie Jul 10, 2025
d7cd4f5
Merge pull request #3500 from processing/connie-codemirror-upgrade
raclim Jul 11, 2025
4f358b4
Merge branch 'develop' into develop-codemirror-v6
khanniie Jul 11, 2025
9cbbd8b
adds initial autocomplete
khanniie Jul 12, 2025
c3d0872
extend js with p5 js
khanniie Jul 18, 2025
456737a
finishes hinter script, implements it
khanniie Aug 9, 2025
e5699d5
finish autocomplete MVP
khanniie Aug 9, 2025
5b9163e
Delete p5-hinter-cm6.js
khanniie Aug 9, 2025
2b82810
fix leftover path
khanniie Aug 9, 2025
9f04f17
fix name casing
khanniie Aug 10, 2025
eae004b
Merge pull request #3582 from processing/cm6-autocomplete
raclim Sep 5, 2025
7290b04
Merge branch 'develop' into develop-codemirror-v6
khanniie Sep 15, 2025
09a052f
initial commit adding search functionality
khanniie Sep 4, 2025
597f180
cleanup references to search and find
khanniie Sep 4, 2025
004f890
Update Nav.unit.test.jsx.snap
khanniie Sep 11, 2025
7b58f6d
Merge pull request #3639 from processing/cm6-search-and-find
raclim Sep 19, 2025
8308700
Merge branch 'develop' into develop-codemirror-v6
khanniie Jan 6, 2026
1b095e9
Update package-lock.json
khanniie Jan 6, 2026
67c11b6
update editor.scss to use new classes
khanniie Dec 12, 2025
387ef02
add highlight styles
khanniie Dec 19, 2025
6b2ad75
more highlight fixes
khanniie Jan 6, 2026
0e599ca
Update package-lock.json
khanniie Jan 9, 2026
84972b0
clean up unused files
khanniie Jan 9, 2026
adacb96
Update documentation, remove dead code
khanniie Jan 9, 2026
f409be4
Update main.scss
khanniie Jan 9, 2026
1892d92
removed unused import
khanniie Jan 9, 2026
f5c1710
Merge pull request #3783 from processing/cm6-themes-v2
raclim Jan 13, 2026
8fa67f9
Add JSON syntax linting to CodeMirror v6 editor
Geethegreat Jan 29, 2026
8ff2e7b
fix error console
khanniie Feb 1, 2026
18124f3
Add documentation
khanniie Feb 1, 2026
996dcb4
small cleanup
khanniie Feb 2, 2026
963c02d
Merge pull request #3832 from processing/cm6-fix-error-console
raclim Feb 3, 2026
4003761
Add tests for tidier.js
Geethegreat Feb 14, 2026
fc6c488
Convert tidier.js to TypeScript && test coverage of tidier.ts
kashish00208 Feb 16, 2026
abae1b3
Merge pull request #3887 from Geethegreat/tidy-prettier-tests
raclim Feb 20, 2026
e42215e
add beneficial test cases for empty strings and syntax errors in tidi…
kashish00208 Feb 20, 2026
1fcd33d
Merge branch 'develop-codemirror-v6' into kashish00208/develop-codemi…
kashish00208 Feb 20, 2026
67c3954
Convert tidier.test.js to tidier.test.ts and finalize ts migration
kashish00208 Feb 20, 2026
8d66da7
test: update to strict formatting checks with exact newlines
kashish00208 Feb 26, 2026
a79f6fb
Merge pull request #3899 from kashish00208/develop-codemirror-v6
khanniie Mar 1, 2026
bab93d6
fix tidier imports and tests
khanniie Mar 1, 2026
5129e12
fix import
khanniie Mar 8, 2026
fcc47fd
Import my modified colorpicker library
khanniie Mar 17, 2026
34de741
refactor: use jsonParseLinter from @codemirror/lang-json
Geethegreat Mar 22, 2026
f5c7c14
add back kind labels and ghost previews to hinter
raclim Mar 23, 2026
0e25543
add keyboard behavior and custom UI for hinter dropdown
raclim Mar 23, 2026
3cc073e
refactor contextaware and analyzer utils to adapt to cm6
raclim Mar 23, 2026
4be55d1
integrate context awareness and ghost text
raclim Mar 23, 2026
e77e2a6
update func name, add ghost text util
raclim Mar 23, 2026
5931f13
add styling for hinter
raclim Mar 23, 2026
0f8ac70
Merge pull request #4006 from processing/cm6-color-picker-import
raclim Mar 24, 2026
d411d2d
tweak wording
raclim Mar 27, 2026
b5e6852
Merge pull request #4043 from processing/autocomplete-hinter-parity
khanniie Apr 2, 2026
bdff696
merge upstream/develop-codemirror-v6 to resolve conflicts
Geethegreat Apr 3, 2026
0bfda9c
Merge pull request #3825 from Geethegreat/json-lint
khanniie Apr 3, 2026
477aad6
Merge branch 'develop' into develop-codemirror-v6
khanniie Apr 10, 2026
38773a6
Update package-lock.json
khanniie Apr 10, 2026
dd02f07
Add back reference url for p5 v2 change
khanniie Apr 10, 2026
2258399
merge
khanniie Apr 10, 2026
0b40206
merge??
khanniie Apr 10, 2026
957a9c6
Migrated to ESlint
Nishthajain7 Mar 9, 2026
bac3fbe
Resolved Merge Conflicts
Nishthajain7 Apr 10, 2026
80b2e8e
add reference url to useEffect and clean up comments
khanniie Apr 10, 2026
3d020a5
Merge pull request #3836 from Nishthajain7/migarte-to-eslint
khanniie Apr 10, 2026
67e6674
Merge branch 'develop-codemirror-v6' of https://github.com/processing…
khanniie Apr 10, 2026
b7a4de9
cleanup imports
khanniie Apr 10, 2026
4cdace3
Revert "cleanup imports"
khanniie Apr 10, 2026
8e5a774
Added Collection List pagination
VaibhavNarayann Apr 12, 2026
e705513
Fix unit test filename typo
VaibhavNarayann Apr 12, 2026
f552f4b
Add locales
VaibhavNarayann Apr 19, 2026
db5b9b8
Merge upstream/develop into feat/collection-list-pagination
VaibhavNarayann May 7, 2026
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
5 changes: 5 additions & 0 deletions client/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ export const RESET_PROJECT = 'RESET_PROJECT';

export const SET_PROJECT = 'SET_PROJECT';
export const SET_PROJECTS = 'SET_PROJECTS';
// <<<<<<< HEAD
export const SET_COLLECTIONS_FOR_COLLECTION_LIST =
'SET_COLLECTIONS_FOR_COLLECTION_LIST';
// =======
export const SET_PROJECTS_FOR_COLLECTION_LIST =
'SET_PROJECTS_FOR_COLLECTION_LIST';
// >>>>>>> develop-codemirror-v6

export const SET_COLLECTIONS = 'SET_COLLECTIONS';
export const CREATE_COLLECTION = 'CREATED_COLLECTION';
Expand Down
111 changes: 84 additions & 27 deletions client/modules/IDE/actions/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ import { setToastText, showToast } from './toast';

const TOAST_DISPLAY_TIME_MS = 1500;

export function getCollections(username) {
return (dispatch) => {
dispatch(startLoader());
let url;
if (username) {
url = `/${username}/collections`;
} else {
url = '/collections';
}
return apiClient
.get(url)
.then((response) => {
dispatch({
type: ActionTypes.SET_COLLECTIONS,
collections: response.data
});
dispatch(stopLoader());
})
.catch((error) => {
dispatch({
type: ActionTypes.ERROR,
error: error?.response?.data
});
dispatch(stopLoader());
});
};
}
// export function getCollections(username) {
// return (dispatch) => {
// dispatch(startLoader());
// let url;
// if (username) {
// url = `/${username}/collections`;
// } else {
// url = '/collections';
// }
// return apiClient
// .get(url)
// .then((response) => {
// dispatch({
// type: ActionTypes.SET_COLLECTIONS,
// collections: response.data
// });
// dispatch(stopLoader());
// })
// .catch((error) => {
// dispatch({
// type: ActionTypes.ERROR,
// error: error?.response?.data
// });
// dispatch(stopLoader());
// });
// };
// }

export function createCollection(collection) {
return (dispatch) => {
Expand Down Expand Up @@ -167,3 +167,60 @@ export function deleteCollection(collectionId) {
});
};
}
const buildCollectionUrl = (username, options = {}) => {
const {
page = 1,
limit = 10,
sortField = 'updatedAt',
sortDir = 'desc',
q = ''
} = options;

const base = username
? `/${encodeURIComponent(username)}/collections`
: '/collections';

const params = new URLSearchParams({
page: String(page),
limit: String(limit),
sortField,
sortDir
});

const trimmed = q.trim();

if (trimmed) {
params.set('q', trimmed);
}

return `${base}?${params.toString()}`;
};

const fetchCollections = (username, options, successType) => (dispatch) => {
dispatch(startLoader());

const url = buildCollectionUrl(username, options);

return apiClient
.get(url)
.then((response) => {
dispatch({ type: successType, collections: response.data });
dispatch(stopLoader());
return response.data;
})
.catch((error) => {
dispatch({ type: ActionTypes.ERROR, error: error?.response?.data });
dispatch(stopLoader());
throw error;
});
};

export const getCollections = (username, options) =>
fetchCollections(username, options, ActionTypes.SET_COLLECTIONS);

export const getCollectionsForCollectionList = (username, options) =>
fetchCollections(
username,
options,
ActionTypes.SET_COLLECTIONS_FOR_COLLECTION_LIST
);
13 changes: 0 additions & 13 deletions client/modules/IDE/actions/ide.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,10 @@ export function hideErrorModal() {
};
}

export function hideRuntimeErrorWarning() {
return {
type: ActionTypes.HIDE_RUNTIME_ERROR_WARNING
};
}

export function showRuntimeErrorWarning() {
return {
type: ActionTypes.SHOW_RUNTIME_ERROR_WARNING
};
}

export function startSketch() {
return (dispatch, getState) => {
dispatch(clearConsole());
dispatch(startVisualSketch());
dispatch(showRuntimeErrorWarning());
const state = getState();
dispatchMessage({
type: MessageTypes.SKETCH,
Expand Down
58 changes: 45 additions & 13 deletions client/modules/IDE/components/AddToCollectionList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import { Helmet } from 'react-helmet';
import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux';
import styled from 'styled-components';
import { addToCollection, removeFromCollection } from '../actions/collections';
import { getCollectionsForCollectionList } from '../actions/collections';
import { Loader } from '../../App/components/Loader';
import {
addToCollection,
getCollections,
removeFromCollection
} from '../actions/collections';
import getSortedCollections from '../selectors/collections';
import QuickAddList from './QuickAddList';
import { remSize } from '../../../theme';
import Pagination from './Pagination';

export const CollectionAddSketchWrapper = styled.div`
width: ${remSize(600)};
Expand All @@ -34,16 +32,38 @@ const AddToCollectionList = ({ projectId }) => {

const username = useSelector((state) => state.user.username);

const collections = useSelector(getSortedCollections);
const collections = useSelector(
(state) => state.collectionsListCollections.collections
);

const paginationMeta = useSelector(
(state) => state.collectionsListCollections.metadata
);

const q = useSelector((state) => state.search.collectionSearchTerm);
const hasCollections = () => collections?.length > 0;

const [page, setPage] = useState(1);
const limit = 10;

// TODO: improve loading state
const loading = useSelector((state) => state.loading);
const [hasLoadedData, setHasLoadedData] = useState(false);
const showLoader = loading && !hasLoadedData;

useEffect(() => {
dispatch(getCollections(username)).then(() => setHasLoadedData(true));
}, [dispatch, username]);
dispatch(
getCollectionsForCollectionList(username, {
page,
limit,
q
})
).finally(() => setHasLoadedData(true));
}, [dispatch, username, page, q]);

useEffect(() => {
setPage(1);
}, [q]);

const handleCollectionAdd = (collection) => {
dispatch(addToCollection(collection.id, projectId));
Expand All @@ -66,11 +86,23 @@ const AddToCollectionList = ({ projectId }) => {
return t('AddToCollectionList.Empty');
}
return (
<QuickAddList
items={collectionWithSketchStatus}
onAdd={handleCollectionAdd}
onRemove={handleCollectionRemove}
/>
<>
<QuickAddList
items={collectionWithSketchStatus}
onAdd={handleCollectionAdd}
onRemove={handleCollectionRemove}
/>
{hasCollections() && (
<Pagination
page={page}
totalPages={paginationMeta.totalPages}
onPageChange={setPage}
limit={limit}
totalCollections={paginationMeta.totalCollections}
isOverlay
/>
)}
</>
);
};

Expand Down
3 changes: 0 additions & 3 deletions client/modules/IDE/components/AddToCollectionSketchList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const AddToCollectionSketchList = ({ collection }) => {
const dispatch = useDispatch();

const username = useSelector((state) => state.user.username);

const sketches = useSelector(
(state) => state.collectionsListProjects.projects
);
Expand All @@ -34,8 +33,6 @@ const AddToCollectionSketchList = ({ collection }) => {

const [page, setPage] = useState(1);
const limit = 10;

// TODO: improve loading state
const loading = useSelector((state) => state.loading);
const [hasLoadedData, setHasLoadedData] = useState(false);
const showLoader = loading && !hasLoadedData;
Expand Down
Loading