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

Bump to production #890

Merged
merged 179 commits into from
Aug 23, 2021
Merged
Changes from 1 commit
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
a0e5112
nits styling and fix constant import bug
tarafanlin Jul 9, 2021
fc04ff3
added image previews if image has cover image only
martinalong Jul 12, 2021
0eaa616
cover images square fixed for cases where cover image exists at start…
martinalong Jul 13, 2021
f10d0b1
centered text for link loading state
martinalong Jul 13, 2021
77036c8
removed remaining sentinel page and fixed tag input color
martinalong Jul 13, 2021
69aa6c9
fixed incorrect import
martinalong Jul 13, 2021
661f7b5
fixed broken monitor subscribe message
martinalong Jul 13, 2021
1ea482c
add external endpoints for creating links
martinalong Jul 13, 2021
ff62ebc
added documentation for external create link endpoint
martinalong Jul 13, 2021
a70838c
Merge pull request #827 from filecoin-project/@tarafanlin/fixes
martinalong Jul 13, 2021
6b13338
updated slate media ojbect preview to use the new function for gettin…
martinalong Jul 13, 2021
4ca134e
added create collection external endpoint and updated docs styles
martinalong Jul 13, 2021
9c52ef4
added convenience function for endpoints checking authentication
martinalong Jul 13, 2021
c180d43
edited tags showing up as the number zero issue
martinalong Jul 13, 2021
d73be6a
added new profile avatars
jasonleyser Jul 13, 2021
50ecf44
Added Intercom back
jasonleyser Jul 14, 2021
bd1d99f
Merge pull request #837 from filecoin-project/@jasonleyser/intercom-u…
martinalong Jul 14, 2021
b8e017e
style and color nits
martinalong Jul 14, 2021
e2521d9
Avatar updates
jasonleyser Jul 15, 2021
fed9948
added microlink api key and object-fit: cover
martinalong Jul 16, 2021
99c71d7
updated global carousel routing style
martinalong Jul 16, 2021
3ecad0d
Update search modal
jasonleyser Jul 19, 2021
7ef3f7a
Merge pull request #836 from filecoin-project/@jasonleyser/boringavatars
martinalong Jul 19, 2021
7fb84a2
added: new colors tokens
Aminejvm May 27, 2021
dadaca6
feat(ObjectPreview): fix typo premitive-> primitive
Aminejvm Jul 14, 2021
d1a8ea2
fix(TextObjectPreview): correct text preview instead of html
Aminejvm Jul 14, 2021
2570a2b
feat(Activity): show the correct number of cards per row
Aminejvm Jul 14, 2021
cf16d77
feat(Activity): order groups by date
Aminejvm Jul 14, 2021
1cfabf7
feat(Activity): change how we format date in ProfileInfo
Aminejvm Jul 14, 2021
5eac0f1
feat(activity): show owner info in CollectionPreviewBlock
Aminejvm Jul 15, 2021
4a4c0ad
feat(theme): update grayLight6,bgBlurLight6,bgBlurLight6OP,bgBlurLigh…
Aminejvm Jul 20, 2021
587b2fe
chore(objectPreviews): remove unnecessary object for placeholders
Aminejvm Jul 20, 2021
9701023
feat(objectPreview): update placeholders svg
Aminejvm Jul 20, 2021
c8755ad
feat(objectPreview): update ImageObjectPreview
Aminejvm Jul 20, 2021
b16ad5d
feat(objectPreview): update FontObjectPreview
Aminejvm Jul 20, 2021
e288c3d
feat(objectPreview): update TextObjectPreview
Aminejvm Jul 20, 2021
1235544
feat(ObjectPreviewPrimitive): update imports
Aminejvm Jul 20, 2021
b400324
feat(typography): add support for 'as' prop
Aminejvm Jul 20, 2021
c40fb98
feat(objectPreview): move placeholders to objectPreview index
Aminejvm Jul 20, 2021
7dad0ca
feat(objectPreview): add hover to see description
Aminejvm Jul 20, 2021
382a021
feat(ProfilePreview): update to new design
Aminejvm Jul 26, 2021
499c57d
feat(CollectionPreview): update collection preview to new design
Aminejvm Jul 26, 2021
913d40c
feat(ObjectPreview): update object preview to new design
Aminejvm Jul 26, 2021
e91041f
fix(hooks): adjust useMounted
Aminejvm Jul 26, 2021
bc62564
feat(activity): add feature flag
Aminejvm Jul 27, 2021
ef3b0ba
feat(ObjectPreview): disable like and save buttons
Aminejvm Jul 27, 2021
6c9a67e
feat(activity): disable my network feed
Aminejvm Jul 27, 2021
8258c18
feat(Activity): add GlobalCarousel
Aminejvm Jul 28, 2021
dfa0724
feat(Activity): delete old scene
Aminejvm Jul 28, 2021
5512a6e
feat(ObjectPreview): add LinkObjectPreview
Aminejvm Jul 28, 2021
52d0f64
added google site verification
martinalong Jul 28, 2021
d0161b9
add forgotten google site verification
martinalong Jul 28, 2021
006511a
adding handling for non number sizes
martinalong Aug 3, 2021
671a230
Merge branch 'main' into @aminejv/activity
martinalong Aug 3, 2021
e0fa932
Merge pull request #835 from filecoin-project/@aminejv/activity
martinalong Aug 3, 2021
ef8e15d
feat(hooks): add useMemoCompare hook
Aminejvm Aug 3, 2021
513498f
feat(utilities): add mapResponsiveProp utility
Aminejvm Aug 3, 2021
1e92409
feat(ProfilePhoto): update size prop to be responsive
Aminejvm Aug 3, 2021
fdec5db
feat(collectionPreview): memoize getObjectPreview
Aminejvm Aug 3, 2021
3dba396
fixing collections.fileCount call
martinalong Aug 3, 2021
efd0025
stylistic edits and color edits
martinalong Aug 3, 2021
d28d2bd
added missing border colors
martinalong Aug 3, 2021
000e66c
changed links to use image instead of screenshot
martinalong Aug 4, 2021
dacf7e5
removed unnecessary call to screenshot api
martinalong Aug 4, 2021
8d1eeb2
Merge pull request #846 from filecoin-project/@aminejv/responsive-pro…
martinalong Aug 4, 2021
2658177
feat(DataView): update checkbox boxShadow
Aminejvm Aug 4, 2021
277e8a3
feat(ObjectPreview): debounce description's hover
Aminejvm Aug 4, 2021
760653b
feat(CollectionPreview): show description on hover
Aminejvm Aug 4, 2021
19b1c7c
fix(getSubscriptionByUserId): return slates.id instead of ownerId as id
Aminejvm Aug 4, 2021
322f8f4
feat(previews): add title prop
Aminejvm Aug 4, 2021
13d4b03
more wrong color fixes
martinalong Aug 4, 2021
c19d436
Merge branch 'main' of github.com:filecoin-project/slate into main
martinalong Aug 4, 2021
ad5fa73
revert favicon
martinalong Aug 5, 2021
a6173d5
tweak the checkbox border color to match the object border color
martinalong Aug 5, 2021
a0174ad
Merge pull request #851 from filecoin-project/@aminejv/preview-tweaks
martinalong Aug 5, 2021
36243cd
feat(sanizeUser): remove email and twitterId
Aminejvm Aug 3, 2021
0b8c1b0
feat(getSocial): remove following and followers
Aminejvm Aug 3, 2021
2c9e7c4
feat(server.js): remove files from profile data
Aminejvm Aug 3, 2021
23fb81d
feat(profile): remove peers and files
Aminejvm Aug 3, 2021
cb69708
remove visibility toggle in sidebar
martinalong Aug 5, 2021
005981e
fix(LinkObject): add text ellipses to the tag
Aminejvm Aug 5, 2021
02f745e
fix(ObjectPreview): update boxShadow and shape
Aminejvm Aug 5, 2021
62d4dd8
feat(PreviewPlaceholders): add link placeholder
Aminejvm Aug 5, 2021
563403d
feat(LinkPreview): add support visit link from preview
Aminejvm Aug 5, 2021
227d337
feat(ObjectPreview): update placeholders ratio
Aminejvm Aug 5, 2021
ec7341b
feat(ObjectPreview): update hover animations to use transforms
Aminejvm Aug 5, 2021
e5fd28a
chore(CollectionPreview): move Preview component into its own component
Aminejvm Aug 5, 2021
f1620d9
feat(CollectionPreview): update hover animation to use transforms
Aminejvm Aug 5, 2021
50dbbfd
fix(hooks): add useIsomorphicLayoutEffect to remove next warnings
Aminejvm Aug 5, 2021
ac0ea21
fix(ObjectPreviews): tweak description
Aminejvm Aug 5, 2021
f4bf3a7
feat(ObjectPreview): improve hover animation
Aminejvm Aug 6, 2021
c54d4b3
feat(CollectionPreview): improve hover animation
Aminejvm Aug 6, 2021
d9c355c
Merge pull request #864 from filecoin-project/@aminejv/preview-tweaks
martinalong Aug 6, 2021
92a4191
feat(LinkPreview): add fallback support to more edge cases
Aminejvm Aug 6, 2021
f09194a
fix(LinkObject): update link's hover color
Aminejvm Aug 6, 2021
cff50aa
feat(ObjectPreview): reduced delay between animations
Aminejvm Aug 6, 2021
eb84d50
feat(CollectionPreview): update title
Aminejvm Aug 6, 2021
c86a738
modified backend to recalculate file privacy upon add/remove from pub…
martinalong Aug 7, 2021
ee410ba
adding forgotten privacy update upon save copy and add to collection
martinalong Aug 7, 2021
d8a51ab
Merge pull request #845 from filecoin-project/update/file-privacy
martinalong Aug 7, 2021
df193fc
remove explore slates
martinalong Aug 7, 2021
3faf4ee
removed likes
martinalong Aug 7, 2021
1b0cd2c
removing user filecount
martinalong Aug 8, 2021
32edc1a
fix(LinkObject): show placeholder when link preview is broken
Aminejvm Aug 9, 2021
c16c8af
feat(ObjectPreview): display popup when only hovering over title and …
Aminejvm Aug 9, 2021
321140a
feat(CollectionPreview): display popup when only hovering over title …
Aminejvm Aug 9, 2021
ed1888d
feat(env): move external servers env to NEXT_PUBLIC format
Aminejvm Aug 4, 2021
edbd3b5
chore(env): remove EXTERNAL_RESOURCES and use new envs
Aminejvm Aug 4, 2021
4f1b0d9
feat(env): add NEXT_PUBLIC_NODE_ENV
Aminejvm Aug 9, 2021
7aa1039
chore(env): update knex config to match NODE_ENV values
Aminejvm Aug 9, 2021
b3fea97
feat(previews): disable description popup on mobile
Aminejvm Aug 9, 2021
4c4bfe7
feat(LinkPreview): add fallback for link favicon
Aminejvm Aug 9, 2021
1c2104a
feat(LinkPreview): adjust ImgPreview style depending on its width
Aminejvm Aug 9, 2021
283b288
fix(Previews): popup overflow
Aminejvm Aug 9, 2021
9870195
fix(LinkPreview): fallback size
Aminejvm Aug 9, 2021
c3d0b48
Merge pull request #852 from filecoin-project/@aminejv/browser-env
martinalong Aug 11, 2021
a5ba109
chore(deps): bump path-parse from 1.0.6 to 1.0.7
dependabot[bot] Aug 11, 2021
3771151
chore(SlateLayout): remove update-layout
Aminejvm Aug 12, 2021
3ff94ca
chore(SlateLayout): remove SlateLayout and SlateLayoutMobile
Aminejvm Aug 12, 2021
d6a7265
chore(SlateLayout): remove layouts from other endpoints
Aminejvm Aug 12, 2021
8e0838b
chore(SlateLayout): replace SlateLayout with DataView
Aminejvm Aug 12, 2021
4b7b249
feat(DataView): update to support CollectionScene
Aminejvm Aug 12, 2021
08b45a7
fix(env): add NODE_ENV back because NEXT_PUBLIC doesn't work with dotenv
Aminejvm Aug 12, 2021
3243e21
fix(Dataview): add _handleDeleteFilesFromCollection
Aminejvm Aug 13, 2021
79be777
fix(delete-files-by-ids): delete files from the likes table
Aminejvm Aug 13, 2021
0518a39
Merge pull request #865 from filecoin-project/@aminejv/preview-tweaks
martinalong Aug 16, 2021
123c598
Merge pull request #872 from filecoin-project/@aminejv/remove-slate-l…
martinalong Aug 17, 2021
d031162
remove screenshotting from external link api and patch node_env issue
martinalong Aug 17, 2021
754b9ff
Merge pull request #875 from filecoin-project/@aminejv/fix-file-delet…
martinalong Aug 17, 2021
df4e8a5
feat(collection): remove owner tag when the viewer is the owner
Aminejvm Aug 17, 2021
54e86b1
feat(collection): add indicator for private collections
Aminejvm Aug 17, 2021
d31bba8
feat(svg): add share, twitter, mail and clipboard icons
Aminejvm Aug 17, 2021
a926282
feat(hooks): add useEventListener and useTimeout hooks
Aminejvm Aug 17, 2021
2047570
feat(hooks): add useEscapeKey and useLockScroll hooks
Aminejvm Aug 17, 2021
3cbb2a7
feat(utilities): add copyToClipboard utility
Aminejvm Aug 17, 2021
d27e1a8
feat(Divider): add support for semantic colors
Aminejvm Aug 17, 2021
2d0fb2b
feat(ShareButton): add ShareButton component
Aminejvm Aug 17, 2021
724e831
feat(ShareModalPrimitive): add ShareModalPrimitive component
Aminejvm Aug 17, 2021
fc22dfb
feat(CollectionSharingModal): build CollectionSharingModal using Shar…
Aminejvm Aug 17, 2021
f1c1273
feat(CollectionPreviewBlock/components/Preview): extend the component…
Aminejvm Aug 17, 2021
9834b39
feat(CollectionPreviewBlock): update to use new preview
Aminejvm Aug 17, 2021
61c27f2
feat(ShareModal): add collection preview
Aminejvm Aug 17, 2021
531df1c
fix(CollectionSharingModal): remove recipient email
Aminejvm Aug 17, 2021
13f9d4c
feat(ShareModal): add responsive styles
Aminejvm Aug 17, 2021
3ad76fa
feat(ShareModal): add dynamic preview as a todo task
Aminejvm Aug 17, 2021
4152d9f
feat(CollectionSharingModal): update social interactions copy
Aminejvm Aug 17, 2021
7a23bec
feat(SceneSlate): use new private indicator
Aminejvm Aug 18, 2021
8048383
Merge pull request #880 from filecoin-project/@aminejv/collection-upd…
martinalong Aug 18, 2021
2de540b
fix import bugs
martinalong Aug 18, 2021
a66fad2
reset package lock.json
martinalong Aug 18, 2021
10c663e
api doc edits and adding google site verification file
martinalong Jul 30, 2021
e739e63
api docs for upload by cid and url
martinalong Aug 2, 2021
9364af2
finished upload by cid and url documentation, including optional file…
martinalong Aug 2, 2021
6908e4b
updated babel core
martinalong Aug 18, 2021
91537fc
updated babel core
martinalong Aug 18, 2021
89e8fcd
Merge branch 'main' of github.com:filecoin-project/slate into main
martinalong Aug 18, 2021
b3c23bd
feat(viewer): update getById to call independent data methods on para…
Aminejvm Aug 19, 2021
54153a5
fix(Object&Collection Previews): fix initial height
Aminejvm Aug 19, 2021
4d189be
fix(Object&Collection Previews): bump border from 0.5px to 1px
Aminejvm Aug 19, 2021
2780d6b
fix(typography): remove font-weights and use correct font family
Aminejvm Aug 19, 2021
4b3a445
fix(Object&Collection Previews): use border property instead of box s…
Aminejvm Aug 19, 2021
e04c528
fix(viewer): use promise.allSettled instead of promise.all in the get…
Aminejvm Aug 19, 2021
2477bcb
Merge pull request #888 from filecoin-project/@aminejv/safari-fixes
martinalong Aug 20, 2021
862ccf8
Merge pull request #887 from filecoin-project/@aminejv/viewer-improve…
martinalong Aug 20, 2021
dae49fd
reinstalled babel register and core
martinalong Aug 20, 2021
f7bdea0
only require babel register on dev
martinalong Aug 20, 2021
6411d02
make babel a regular dependency
martinalong Aug 20, 2021
f730747
remove NODE_ENV=production preset
martinalong Aug 20, 2021
ac49b54
redoing it
martinalong Aug 20, 2021
cebeb72
chore(deps-dev): bump @babel/eslint-parser from 7.13.14 to 7.15.0
dependabot[bot] Aug 20, 2021
e81b4ed
Merge pull request #863 from filecoin-project/dependabot/npm_and_yarn…
martinalong Aug 22, 2021
1e66776
Merge pull request #868 from filecoin-project/dependabot/npm_and_yarn…
martinalong Aug 22, 2021
510a33c
added node env production back in
martinalong Aug 22, 2021
9eb8367
chore(deps): bump next from 10.1.2 to 11.1.0
dependabot[bot] Aug 22, 2021
3109269
changed react blurhash to regular import
martinalong Aug 22, 2021
f8ee111
Merge pull request #871 from filecoin-project/dependabot/npm_and_yarn…
martinalong Aug 22, 2021
5ce77bf
fix(package.json): move @babel/registerfrom devDependencies to depend…
Aminejvm Aug 23, 2021
67529c7
fix(package.json): lower version of NextJs to 10.0.7
Aminejvm Aug 23, 2021
69949a3
Merge branch 'production' into main
Aminejvm Aug 23, 2021
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
Prev Previous commit
Next Next commit
feat(hooks): add useEventListener and useTimeout hooks
  • Loading branch information
Aminejvm committed Aug 17, 2021
commit a92628251a2ecffef62e3c8d0277a0e93b1cf712
36 changes: 28 additions & 8 deletions common/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ export const useForm = ({
});

const _hasError = (obj) => Object.keys(obj).some((name) => obj[name]);
const _mergeEventHandlers = (events = []) => (e) =>
events.forEach((event) => {
if (event) event(e);
});
const _mergeEventHandlers =
(events = []) =>
(e) =>
events.forEach((event) => {
if (event) event(e);
});

/** ---------- NOTE(amine): Input Handlers ---------- */
const handleFieldChange = (e) =>
Expand Down Expand Up @@ -164,10 +166,12 @@ export const useField = ({
touched: undefined,
});

const _mergeEventHandlers = (events = []) => (e) =>
events.forEach((event) => {
if (event) event(e);
});
const _mergeEventHandlers =
(events = []) =>
(e) =>
events.forEach((event) => {
if (event) event(e);
});

/** ---------- NOTE(amine): Input Handlers ---------- */
const handleFieldChange = (e) =>
Expand Down Expand Up @@ -390,3 +394,19 @@ export const useMediaQuery = () => {
mobile: isMobile,
};
};

export const useEventListener = (type, handler, dependencies) => {
React.useEffect(() => {
if (!window) return;

window.addEventListener(type, handler);
return () => window.removeEventListener(type, handler);
}, dependencies);
};

export const useTimeout = (callback, ms, dependencies) => {
React.useEffect(() => {
const timeoutId = setTimeout(callback, ms);
return () => clearTimeout(timeoutId);
}, dependencies);
};