Skip to content

Commit 12ed2b7

Browse files
committed
a one word fix to address the meme view sync issue on the collections
1 parent cbdf7eb commit 12ed2b7

File tree

4 files changed

+47
-76
lines changed

4 files changed

+47
-76
lines changed

AppCode/taga-JS/collections/collection-controller.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function addMouseOverIconSwitch_Collection(emotion_div,child_num=1) {
125125
image.addEventListener("mouseover", () => (image.src = CLOSE_ICON_RED));
126126
image.addEventListener("mouseout", () => (image.src = CLOSE_ICON_BLACK));
127127
}
128-
//console.log('get ')
128+
129129
}
130130

131131
//this function deletes the entity object currently in focus from var 'current_key_index', and calls for the refresh of the next entity to be in view
@@ -335,8 +335,8 @@ async function Collection_Memes_Page() {
335335
//masonry is called after all the images have loaded, it checks that the images have all loaded from a promise and then runs the masonry code
336336
//solution from: https://stackoverflow.com/a/60949881/410975
337337
Promise.all(Array.from(document.images).filter(img => !img.complete).map(img => new Promise(resolve => { img.onload = img.onerror = resolve; }))).then(() => {
338-
var grid_gallery = document.querySelector(".collection-image-annotation-memes-images-grid-class");
339-
var msnry = new MASONRY(grid_gallery, {
338+
let grid_gallery = document.querySelector(".collection-image-annotation-memes-images-grid-class");
339+
let msnry = new MASONRY(grid_gallery, {
340340
columnWidth: '.collection-image-annotation-memes-masonry-grid-sizer',
341341
itemSelector: '.collection-image-annotation-memes-grid-item-class',
342342
percentPosition: true,
@@ -372,6 +372,7 @@ async function Save_Meme_Changes(){
372372
async function Display_Gallery_Images() {
373373
//clear gallery of gallery image objects
374374
document.querySelectorAll(".collection-images-gallery-grid-item-class").forEach(el => el.remove());
375+
375376
//place the gallery images in the html and ignore the missing images (leave the lingering links)
376377
let gallery_div = document.getElementById("collections-images-gallery-grid-images-div-id")
377378
let gallery_html_tmp = ''
@@ -395,8 +396,8 @@ async function Display_Gallery_Images() {
395396
//masonry is called after all the images have loaded, it checks that the images have all loaded from a promise and then runs the masonry code
396397
//solution from: https://stackoverflow.com/a/60949881/410975
397398
Promise.all(Array.from(document.images).filter(img => !img.complete).map(img => new Promise(resolve => { img.onload = img.onerror = resolve; }))).then(() => {
398-
var grid_gallery = document.querySelector(".collection-images-gallery-grid-class");
399-
var msnry = new MASONRY(grid_gallery, {
399+
let grid_gallery = document.querySelector(".collection-images-gallery-grid-class");
400+
let msnry = new MASONRY(grid_gallery, {
400401
columnWidth: '.collection-images-gallery-masonry-grid-sizer',
401402
itemSelector: '.collection-images-gallery-grid-item-class',
402403
percentPosition: true,
@@ -406,7 +407,7 @@ async function Display_Gallery_Images() {
406407
});
407408
//event listener to modal focus image upon click
408409
image_set.forEach(function(image_filename) {
409-
image_path_tmp = PATH.join(TAGA_DATA_DIRECTORY, image_filename)
410+
let image_path_tmp = PATH.join(TAGA_DATA_DIRECTORY, image_filename)
410411
if(FS.existsSync(image_path_tmp) == true){
411412
document.getElementById(`collection-image-annotation-grid-img-id-${image_filename}`).onclick = function (event) {
412413

@@ -536,7 +537,7 @@ async function Show_Collection() {
536537
//display the entity hastag 'name'
537538
document.getElementById("collection-name-text-label-id").textContent = current_collection_obj.collectionName;
538539
//display gallery images
539-
Display_Gallery_Images()
540+
await Display_Gallery_Images()
540541
//
541542
if(annotation_view_ind == 1) {
542543
Collection_Description_Page()
@@ -548,10 +549,8 @@ async function Show_Collection() {
548549
}
549550
async function Update_Profile_Image() {
550551
let file_path = PATH.join(TAGA_DATA_DIRECTORY, current_collection_obj.collectionImage);
551-
//console.log('file_path',file_path)
552552
let ft_res = await fileType.fromFile(file_path)
553553
//let node_type = ( ft_res.mime.includes("image") ) ? 'IMG' : 'VIDEO'
554-
//console.log('node_type',node_type)
555554
let content_html;
556555
if( ft_res.mime.includes("image") ) {
557556
content_html = `<img id="collection-profile-image-img-id" src="${file_path}" title="view" alt="collection-profile-image"/>`
@@ -710,7 +709,6 @@ Initialize_Collection_Page()
710709
//whenever an image is clicked to pop up a modal to give a big display of the image
711710
//and list the tags and emotions
712711
async function Image_Clicked_Modal(filename, node_type) {
713-
//console.log(filename)
714712
//document.getElementById("modal-image-clicked-displayimg-id").src = PATH.join(TAGA_DATA_DIRECTORY,filename)
715713
let modal_display_div = document.getElementById("modal-image-clicked-image-gridbox-id")
716714
document.getElementById("modal-image-clicked-image-gridbox-id").innerHTML = ""
@@ -1843,7 +1841,6 @@ async function Search_Collections_Search_Action() {
18431841
// var indices = new Array(len);
18441842
// for (var i = 0; i < len; ++i) indices[i] = i;
18451843
// indices.sort(function (a, b) { return test[a] < test[b] ? -1 : test[a] > test[b] ? 1 : 0; });
1846-
// console.log(indices); // prints [2,3,0,1]
18471844

18481845

18491846

AppCode/taga-JS/utilities/general-helper-fns.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ async function Create_Media_Thumbnail(file_key, class_name, id_tmp, provide_path
1111
} else {
1212
file_path = file_key
1313
}
14-
ft_res = await fileType.fromFile( file_path )
15-
type = "meme"
14+
let ft_res = await fileType.fromFile( file_path )
15+
let type = "meme"
1616
if( ft_res.mime.includes('image') == true ) {
1717
return `<img class="${class_name}" id="${id_tmp}" src="${file_path}" title="view" alt="${type}" />`
1818
} else if( ft_res.mime.includes('pdf') == true ) {

TagasaurusReflections/TagaConcepts.txt

Lines changed: 37 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Remember the awesome time of Nokia phones? But do you remember some of
1+
Remember the awesome time of Nokia phones? If so, do you remember some of
22
their software that came with it such as the Nokia LifeBlog?
3-
(https://en.wikipedia.org/wiki/Nokia_Lifeblog) it was great! What was
4-
missing from it were TAGS, a sharing mechanism, and the incentive
5-
dynamic.
6-
7-
Tim Berners-Lee describes his motivation and thinking for the URL in
8-
his biographies which emphasize the emergence of the WWW. Those
9-
concepts have taken not only root but rest like the Turtle which
10-
supposedly held up the universe. Do URLs and URIs with their
3+
(https://en.wikipedia.org/wiki/Nokia_Lifeblog) it was great! There
4+
were some things it did not have which Tagasaurus does.
5+
6+
Tim Berners-Lee describes in his autobiography the motivation and thinking
7+
for the URL which emphasizes the ideas behind the emergence of the WWW. Those
8+
concepts have become roots of communications but we can also consider
9+
whether those ideas are like the mythological Turtle which
10+
supposedly held up the universe on its shell. Do URLs and URIs with their
1111
insistance, or effort, to make things unique, not end up supporting
12-
our world on this hard but brittle 'shell'? Our world has redundancy
13-
and the organic nature of life promotes redundancy. Resources in
14-
nature have duplicates and it is a natural occurance which is not
12+
our world on this hard but brittle 'net'? Our world has redundancy
13+
and the organic nature of life promotes redundancy even at a cost. Resources
14+
in nature have duplicates and it is a natural occurance which is not
1515
truly embraced with the 'U' in URLs.
1616

1717
This document, https://www.ietf.org/rfc/rfc3986.txt, describes in more
@@ -20,13 +20,13 @@ defining the URI in 2005. From the Abstract: <...resolving URI
2020
references that might be in relative form, along with guidelines and
2121
security considerations for the use of URIs on the Internet. The URI
2222
syntax defines a grammar that is a superset of all valid URIs...>, and
23-
the keywords 'resolving'/'security'/'valid'. These keywords have to
24-
emerge once you place that letter 'U' for universal/unique/uniform
25-
etc. It is a basic axiom from which other assumptions emerge
23+
the keywords 'resolving'/'security'/'valid'. These keywords have to have
24+
strong emphasis once you place that letter 'U' for universal/unique/uniform
25+
etc. It is a basic axiom from which other assumptions necessarily emerge
2626
directly. What is wrong with them? You have to 'resolve' issues from
27-
the stochastic nature of life to keep a common understanding, you have
28-
to keep it secure as to have the uniform it will need a central
29-
authority. This introduces, a vulnerability to the whole network and
27+
the stochastic nature of life to keep a 'common' understanding, you have
28+
to keep it secure for the uniform needing a central authority the common
29+
consensus. This introduces, a vulnerability to the whole network and
3030
the word valid means there has to be a gatekeeper regardless of how
3131
that deciding entity is given access.
3232

@@ -50,11 +50,7 @@ Even from early on in the document: 1.1. Overview of URIs
5050
<Uniformity provides some benefits...> Ok, but does it take any other
5151
benefits away?.. < It allows different types of resource identifiers
5252
to be used in the same context> Yes, that is correct but can you then
53-
use those types in different context without making mix ups?
54-
55-
And Tim Berners-Lee finds it surprising that the web and data is under
56-
control and is trying to fix it with Inrupt and Solid using the same
57-
axioms of information space?..
53+
use those types in different contexts without making mix ups?
5854

5955
It is reinforced throughout the document; "Each URI begins with a
6056
scheme name, as defined in Section 3.1, that refers to a specification
@@ -71,7 +67,7 @@ document outlining a bureaucracy of how to deal with all of the issues
7167
of the locations and identifications of resources. Yes, it brings a
7268
benefit set listed, but the question is; if I let go of those
7369
requirements can I get something in return for the loss? Hopefully
74-
something equally as good. At the moment it looks like a realestate
70+
something equally as good. At the moment it all looks like a realestate
7571
competition.
7672

7773
The Good Stuff ---- After having pointed out all the things that can
@@ -96,10 +92,10 @@ that the Roman philosopher Epectitus said something similar many years
9692
before that?! What is more interesting is that the romantic languages
9793
(and others) give the ability for verbs to apply to inanimate objects
9894
and for them to have grammatical gender so that they are given a bit
99-
of personality. This in Homer is evident in parts where its described
95+
of personality. In Homer is evident in parts where its described
10096
how the arrow raced with all its might to the target, or even in
10197
George Martin's Game of Thrones books which also uses the Homer
102-
structure where there are chapters for each character in the great
98+
technique where there are chapters for each character in the great
10399
war; when Tyrion is in the underground tunnel system turning the
104100
frozen lock and its described how the 'lock screamed in protest'. So
105101
this means our triple store can have even
@@ -133,7 +129,7 @@ down what a URI means when it is engineered. The attempt to
133129
theoretical solutions which appear to lead no where after rounds of
134130
debate and consideration;
135131
https://www.w3.org/DesignIssues/PhilosophicalEngineering.html. The
136-
central unit organization has a lot of work to make sure local
132+
central unit of organization has a lot of work to make sure local
137133
stochasticity does not disrupt and spread. To avoid handling all those
138134
issues, protocols and regulations try to catch similar circumstances
139135
in the future to save time and money for the command center (or
@@ -146,40 +142,17 @@ consortium).
146142
- What are we going to do about it? Give users a tool to tag resources
147143
as they naturally desire and provide a sharing mechanism that
148144
captures the correspondance and compatibility of the resourses and
149-
meta-data.
150-
151-
- How will that work? Meta-data is applied to content by users which
152-
is then shared, users receiving new content and the associated
153-
meta-data sample the compatibility of the datasets applying a
154-
confirmation or disapproval of the meta-data which is then used to
155-
decide whether the source user's data is compatible for a merge or
156-
not.
157-
158-
- Why will people bother using it? Time is precious and this tool will
159-
take time from the user, to help them avoid wasting even more time
160-
scanning through resources which are hard to index/sort through
161-
relevance, and have like minded people's effort augment their own.
162-
163-
- Is there a way to lure power users to participate? It is known that
164-
the effort amongst users in a group follows a power law and there
165-
has to be incentive for those capable of putting in the time to do
166-
so; some direct feedback for their efforts.
145+
meta-data. A share becomes a merge.
167146

168147
- Can a new approach filter out unwanted content? This is probably the
169148
most essential as filtration is a basic principle and the user will
170149
have to take responsibility on this matter in the merge.
171150

172-
How the promotion scheme works can become intricate and complicated
173-
very easily. It can be kept simple by relying on the premise that any
174-
activity which a user produces can be shared with other users that can
175-
express their approval or disapproval.
176-
177151
Why not use the method of Marko Rodriguez, the famous graph database
178-
scientist behind TitanDB and infamous Twitter user who also is a
179-
chicken farmer? Yes, the method of <Rodriguez, M. A. (2009). A graph
180-
analysis of the linked data cloud. arXiv preprint arXiv:0903.0194.> is
181-
very intresting but even in the abstract he says "integrating Resource
182-
Description Framework (RDF)data sets into a single unified
152+
scientist behind TitanDB? Yes, the method of <Rodriguez, M. A. (2009).
153+
A graph analysis of the linked data cloud. arXiv preprint arXiv:0903.0194.>
154+
is very intresting but even in the abstract he says "integrating Resource
155+
Description Framework (RDF) datasets into a single unified
183156
representation" and does not deviate from that premise. There is the
184157
effort to do this 'automatically' in <Rodriguez, M. A., Bollen, J., &
185158
Sompel, H. V. D. (2009). Automatic metadata generation using
@@ -192,9 +165,10 @@ multi-relational networks and grammar-based particle swarms. In 2007
192165
40th Annual Hawaii International Conference on System Sciences
193166
(HICSS'07) (pp. 39-39). IEEE.> where the relations propagate through
194167
the network; but it never actually involves the user in that
195-
propagation! The propagation without a user filtration for context
196-
means that errors can grow from the constant relevant signal of
197-
ontological information. There is also an approach by Mantzaris
168+
propagation therefore another mapping or coalescence! The propagation
169+
without a user filtration for context means that errors can grow
170+
from the constant relevant signal of ontological information. There is
171+
also an approach by Mantzaris
198172
<Mantzaris, A. V., Walker, T. G., Taylor, C. E., & Ehling,
199173
D. (2019). Adaptive network diagram constructions for representing big
200174
data event streams on monitoring dashboards. Journal of Big Data,
@@ -203,13 +177,13 @@ frequency of co-occurances, but even though that does allow for
203177
overlaps of ontological tags, and a natural growth of edge types for
204178
separations permitting even disjoint networks; its method of analysis
205179
is aimed at people being able to visualize the network topologies
206-
rather than incentive them to tag or to organize their accumulated
207-
resource set.
180+
rather than incentivize them to tag or to organize their accumulated
181+
resource set in their own space.
208182

209183
Once completed would this not fulfill the aspriration of Marvin Minsky
210184
to build a database of common sense? Yes and no. He wanted a database
211185
for all common sense of people as a single map which would mean that
212-
there would be so many exceptions for each rule/association that it
186+
there would be so many exceptions for each rule/association so it
213187
would not generalize well. People evolve and so does their view of
214188
common sense. What is even more daunting is the realization that as
215189
'common sense' evolves, changes, there are pockets of localized
@@ -218,7 +192,7 @@ propagate through the network. The idea of relying upon localized
218192
incentive to perform the actions in an ad-hoc localized manner seems
219193
more plausible.
220194

221-
*There is another version of this quote by Kalashnikov: "When a young
195+
*There is a quote by Kalashnikov: "When a young
222196
man, I read somewhere the following: God the Almighty said, 'All that
223197
is too complex is unnecessary, and it is simple that is needed' So
224198
this has been my lifetime motto – I have been creating weapons to
@@ -229,7 +203,7 @@ things that are useful are simple."
229203
From the book, "The Unfinished Revolution: How to Make Technology Work
230204
for Us--Instead of the Other Way Around", by the late Michael
231205
Dertouzos we can understand that his vision assumed individuals with
232-
local storage that would then choose to integrate their searches and
206+
local storage would then choose to integrate their searches and
233207
data with others based upon the chosen demand.
234208

235209
Linus Torvalds: "Talk is cheap, show me the code" -why is it cheap?

test.flv

-641 KB
Binary file not shown.

0 commit comments

Comments
 (0)